Configure mysql connection pool in Weblogic 9.1 domain
This article describes how to configure the mysql connection pool in the domain of weblogic 9.1:
1. Add the mysql driver under serverlib In the weblogic directory
Mysql-connector-java-3.1.11-bin.jar
2. Find commEnv. cmd in the commonin directory of weblogic to open
Find the path followed by set weblogic_classpath = and add the mysql driver.
Example: % WL_HOME % serverlibmysql-connector-java-3.1.11-bin.jar
3. Create a domain
4. Open start AdminServer for weblogic Server domain in the start Menu.
Wait until the running status
5. Open the console and enter the user name and password.
6. Open Service-> JDBC-> Data Source.
7. JDBC Data Source Properties page
The Name can be the same as the JNDI Name. I Name it MySQLJDBCDataSource.
Database Type: select MySQL
Database Driver: select the Driver under the First com package and click Next.
8. Transaction Options
Select the last Emulate Two-Phase Commit Next.
9. Connection Properties
Database Name: Your database name, for example, test
Host Name: host name, for example, localhost or 192.168.1.117
Port: 3306 (MySQL Default)
Database User name: Database User Name
Password: Database Password
Confirm Password: Same as next
10. Test Database Connection
Click test configuration to test the database connection. Next
11. select targets
Select the adminserver's JNDI tree. Next
12. Click Activate changes in the upper left corner. If no exception occurs, it will be OK.
Tip:
1) if you configure a connection pool directly under WebLogic instead of a domain under WebLogic, skip step 1 or 2.
2) If the configuration is successful, you can click your adminserver (Admin) on the environment> servers page in the console, and then view the configured JNDI name in the JNDI tree.