Posted on 2008-07-12 22:13
sailor 阅读(526)
评论(0) 编辑 收藏 所属分类:
Glassfish
1、将数据库驱动程序放入%glassfish_home%\domains\domain1\lib\ext下
2、新建一个Pool Name。路径如下:Resources -> JDBC -> Connection Pools -> New
配置:
Name = mysqlConn
Resource Type = javax.sql.DataSource
Database Vender = Mysql
URL = jdbc:mysql://:3306/
User = root
Password = sa
ServerName = localhost
Port = 3306
3、新建JNDI 。路径如下:Resources -> JDBC -> JDBC Resources -> New
配置:
JNDI = mysqlConn/jdbc
PoolName = mysqlConn