Sunday, May 07, 2006

Creating Oracle DataSource in Glassfish

To setup an Oracle Datasource in Glassfish, follow these steps:

1. Copy the Oracle JDBC drivers to /glassfish/domains/domain1/lib/ext directory. You may need to change the directory /glassfish/domains/domain1 to match your installation of Glassfish and the domain name.

2. Start Glassfish.

3. Login to the admin interface and create a JDBC Connection Pool.
Delete all properties, and add following properties:
user - set this to Oracle userid
password - set this to Oracle password
URL - set this to the URL, example jdbc:oracle:thin:@localhost:1521:xe.
xa-driver-does-not-support-non-tx-operations - set this to true.
Test the connection pool using ping.

4. Create a JDBC DataSource using the Connection Pool.


NetHandicap said...

I wrote an article about this, with a bit of information.
I hope this helps anyone to set it up quicker.
Here is the url:

Worked with my Oracle 8i and 10g

tronmcp said...

Wow Great instructions, I was looking every where and finally found this site and fixed my issue in 2 mins! Thanks again

komarios said...

Another detailed tutorial for creating an oracle connection pool in Glassfisf (2.1.1) is here: