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:
- First of all, in this steps i use SJSAS 9.1_02 with JDK 1.6 Update 10.
- Go to the Admin Console [http://localhost:4848/ is the default].
- Select Resource > JDBC > Connection Pools.
- Then select ‘New…’ on pools.
- In the general settings, fill the pool name and select the resource type and the database vendor [depends on your database].
- Click ‘Next’ to continue.
- The next session is set the properties. There are four most important properties to be set. There are:
- Click ‘Finish’ to finish.
- 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:
- Still on the admin console, select Resource > JDBC > JDBC Resources. Click ‘New…’.
- 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].
- Click ‘OK’ and now you can access a datasource by using a JNDI namely ‘jdbc/tutorial’.
have a good day…