23 Nov 2009 @ 9:01 AM 

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

Step 1

Click “Next” to configure the settings

Step 2

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

Glassfish MySQL connection pool Step3

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:

conpool4

dont forget to configure your username and password under “additional properties”
Glassfish MySQL connection pool Step5

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.

Posted By: Zayin
Last Edit: 26 Feb 2010 @ 08:12 AM

EmailPermalink
Tags
Tags: ,
Categories: glassfish, mysql


 

Responses to this post » (2 Total)

 
  1. zayinkrige says:

    [New Blog Post] Configure MySQL connection pool in Glassfish v2 – http://www.zayinkrige.com/?p=59

  2. komarios says:

    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

Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 38
  • Comments » 61
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Links



    No Child Pages.

Portfolio



    No Child Pages.