Connection pooling in Sun Java[TM] System Application Server [SJSAS]

At this post you will see how easy in creating a connection pooling and JDBC Resource in Sun Java [TM] System Application Server.

you may need to use a JDBC Resource when you are going to develop an enterprise application, okay, these are the steps:

  1. First of all, in this steps i use  SJSAS 9.1_02 with JDK 1.6 Update 10.
  2. Go to the Admin Console [http://localhost:4848/ is the default].
  3. Select Resource > JDBC > Connection Pools.
  4. Then select ‘New…’ on pools.
  5. In the general settings, fill the pool name and select the resource type and the database vendor [depends on your database].
  6. Click ‘Next’ to continue.
  7. The next session is set the properties. There are four most important properties to be set. There are:
  8. Click ‘Finish’ to finish.
  9. Now you have a new connection pool, to test it, just click on the ‘Ping’ button. You will see this when it’s succeeded.

really easy, after creating the pool, let’s move to create the JDBC Resource. Creating JDBC Resource is much easier than creating it’s pool. These are the steps:

  1. Still on the admin console, select Resource > JDBC > JDBC Resources. Click ‘New…’.
  2. You just have to write down the JNDI name [prefixed by ‘jdbc/’], for e.g. ‘jdbc/tutorial’ and the pool which this resource will use [select the last pool that you ‘ve made before].
  3. Click ‘OK’ and now you can access a datasource by using a JNDI namely ‘jdbc/tutorial’.

have a good day…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s