mathz.nu Asterisk Blacklist Hobby webbhotell

2015/08/20

MySQL JDBC Connection in Glassfish

Filed under: Glassfish — Mathz @ 19:50

Start to add a new JDBC Connection Pools.

* Goto Resources-> JDBC -> JDBC Connection Pools
* Click New…
* Enter a pool name (identyfy the pool, free text)
* Choose java.sql.Driver
* Click Next
* Enter com.mysql.jdbc.Driver in Driver Classname
* Add additional properties:

Name Value
URL jdbc:mysql://localhost:3306/<databaseName>?zeroDateTimeBehavior=convertToNull
user <username>
password <password>

* Click on finish

 

Create a new JDBC Resource
* Goto Resources-> JDBC -> JDBC Resources
* Click New…
* Enter jdbc/ as JNDI Name
* Choose the Pool the you created above as Pool Name
* Click OK

Download mysql-connector-java-.jar to the glassfish4/glassfish/lib mapp (https://dev.mysql.com/downloads/connector/j/5.0.html)

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress