Do not limit your challenges.. Challenge your limits

BTemplates.com

Search This Blog

Powered by Blogger.

About Me

My photo
kathmandu, Bagmati, Nepal
I am Software developer based on Nepal.I have started coding since mid of 1995 with QBasic.My interest in software development covers a broad range of technologies from assembly to the Microsoft .NET platform to Java, Linux to Windows, Windows Mobile to Android, desktop to web to mobile, and many others. But from 2007 I am just working on Java mainly working on Java EE platform and decided just to go with it. I really like to learn new stuff and share things with others which is my main objective in creating this blog.

ArchUnit : Java architecture test library

Finally I have found the required library which will enforce architecture patterns . ArchUnit  . Currently I am exploring it and will upd...

Friday, July 24, 2015

Using Postgres driver on Glassfish 4 / Payara




Installing Driver

  1. Download Postgres JDBC driver
  2. Copy the driver to GLASS_FISH_HOME/domains/YOUR_DOMAIN/lib , for example /opt/java_tools/payara41/glassfish/domains/domain1/lib/
  3. Restart Server 


Creating Connection Pool

  1. Goto Resource >> JDBC >> JDBC Connection Pools
  2. Press New Button
  3. Give Pool Name say TEST_POOL
  4. Select Resource Type to  javax.sql.ConnectionPoolDataSource
  5. Select Vendor as Postgres
  6. Press Next
  7. Goto Additional Properties 
  8. Select all and remove
  9.  Add  properties as shown below





   
    10.  Press Finish
    11.  Select Pool
    12.  Click on Ping . If everything is correctly entered, it shows Ping Succeeded
Adding JDBC Resources

  1. Click " New "
  2. Give JNDI Name say "jdbc/TEST"
  3. Select Pool Name which is created earlier " TEST_POOL " 
  4. Press OK
Now, JDBC datasource is created . 

Happy Coding...

0 comments:

Post a Comment