DuSant
DuSant

Reputation: 1020

Configure Connection Pool with EclipseLink

I am currently working in a project with:

jsf 2.1.2, eclipseLink 2.4.1, sql server 2008 windows authentication and Apache tomcat 7.0 

I already set up the connection and jndi and everything works fine.

There is another requierement, I have to configure a connection pool because i will have only one connection (because of the win authentication), Do you know the best way to configure a connection pooling with JPA? is it posible?

Thanks in advance

Upvotes: 1

Views: 2996

Answers (1)

tahagh
tahagh

Reputation: 807

If you only have one web application on your tomcat you can use the internal Eclipselink connection pool. (You might also check this)

But if you have several applications or you need a different connection pool you should first disable the Eclipselink internal pool and setup a datasource in your tomcat and use tomcat connection pool (or any other solution). Finally, you should modify your persistence.xml to point to this datasource.

Upvotes: 2

Related Questions