This post will describe step-by-step how to setup a MySQL connection pool in Glassfish v2. Lookout for the next blog entry that details how to use that connection pool from your JAVA app.
Step 1:
Log in to your Glassfish admin console ( http://localhost:4848/) and create the connection pool using the settings below

Click “Next” to configure the settings

Once you have configured the settings, you can save your connection pool. In order to establish that everything is working, use the “ping” command at the top of the page

Once we have the fully-functional container connection-pool, the next step is to declate the JDBC Resource which presents this connection pool to the application code. For this you must use the other Administration option in the JDBC section:

dont forget to configure your username and password under “additional properties”

This is pretty straight forwards – and the JNDI Name must have the ‘/jdbc’ prefix to show up in the correct context branch for when you locate the resource in your JAVA applet. At this point you have the Glassfish container configured correctly to offer you a jdbc connection pool and resource.
And thats all there is to creating a MySQL Connection pool in Glassfish.
In the next blog post we discuss how to use this connection pool from your JAVA applet.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 
[New Blog Post] Configure MySQL connection pool in Glassfish v2 – http://www.zayinkrige.com/?p=59
Another tutorial setting up a mysql 5 connection pool on GlassFish 2.1.1 can be found here :
http://mariosgaee.blogspot.com/2009/12/mysql-connection-pool-in-glassfish.html