How to Create a Connection Pool for Postgresql on Glassfish
This tutorial assumes that 1.) You already have Glassfish 3.1.1 installed. https://blogs.oracle.com/java/entry/glassfish_3_1_1 2.) Cre...
https://www.czetsuyatech.com/2012/05/javaee-create-connection-pool-on-glassfish.html
This tutorial assumes that
1.) You already have Glassfish 3.1.1 installed.
https://blogs.oracle.com/java/entry/glassfish_3_1_1
2.) Create and start a Glassfish domain
a.) asadmin create-domain czetsuya
b.) asadmin start-domain czetsuya
Steps
1.) Navigate to http://localhost:4848 (4848 is the default admin port for glassfish)
2.) In the left side click Resources->JDBC
3.) Click JDBC Connection Pools
a.) Click New and enter myPool, ConnectionPoolDataSource, Postgresql on the input fields
1.) You already have Glassfish 3.1.1 installed.
https://blogs.oracle.com/java/entry/glassfish_3_1_1
2.) Create and start a Glassfish domain
a.) asadmin create-domain czetsuya
b.) asadmin start-domain czetsuya
Steps
1.) Navigate to http://localhost:4848 (4848 is the default admin port for glassfish)
2.) In the left side click Resources->JDBC
3.) Click JDBC Connection Pools
a.) Click New and enter myPool, ConnectionPoolDataSource, Postgresql on the input fields
b.) Click next, in the Datasource Classname: PGConnectionPoolDataSource must be selected. Below you should fill up at least user, password, database.
c.) Click finish.
4.) Create a JDBC Resource base on the connection pool created.
a.) Under Resources->JDBC->JDBC Resources, select New and enter the ff values and don't forget to choose our newly created pool "myPool"
5.) We're done :-). Don't forget to create a postgres user admin/admin. And database with name czetsuya.
Post a Comment