1,进入weblogic控制台http://locahost:7001/console
2,new 一个Data Source
(注:右边会列出已存在的Data Source)
3,Name可以自己定义,JNDI Name写成ACCOUNT,下边选择对应的数据库类型,对应的数据库驱动会自动选择,然后点击Next
(注:JNDI Name:Data Source JNDI Name,
Database Type:选择要连接的Database各类
Database Driver:选择Database的driver
)
4,直接Next
(注:Supports Global Transactions:设定此Data Sorce是否支持Global Transactions)
5,Database Name要连接的数据库的名字,Host Name创建数据库的机器的IP,图上的localhost写错了,嘿嘿,Database User Name:数据库用户名,password:密码,填写完成后点击next
6,点击Test Configuration测试数据源,上边出现绿色的Connection test succeeded代表数据源连接成功,点击Next
7,勾中AdminServer ,然后点击Finish完成
8,点击刚才创建好的数据源
9,点击Configuration->connection Pool,点下边的Advanced超链接进去
10,勾中Test Connections On Reserve 然后点击Save,最后再点击Save
11,点击自己创建的数据源,Monitoring->Testing,选择AdminServer然后点击Test Data Source
12,出现如下的绿色内容,则连接表成功