Create Oracle DataSource in Glassfish

1 . Copy JDBC Oracle driver to GLASSFISH/lib, for example, copy ojdbc14.jar to /usr/local/glassfish/lib.

2. Restart Glassfish, log on to Glassfish admin interface, create a new 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, Format : jdbc:oracle:thin:@HOSTNAME:PORT:SID.

Test the connection pool by clicking the “ping” button to get the verify  message.

3. Create a JDBC DataSource using the JDBC Connection Pool.

Full details for creating an Oracle connection pool in Glassfish2.1.1 can be found from the link below:

Full details for creating MySQL connection pool in Glassfish can be found from the link below:

One comment

  1. Ahmad Shakil

    You can add JDBC URL like below


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 )

Facebook photo

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

Connecting to %s