-
Jan 25th, 2012, 01:41 PM
#1
Tomcat 7 connection pool / JPA : Getting a specific connection
I am using Spring together with JPA and the Tomcat 7 connection pool.
How is it possible to specify that the EntityManager injected by Spring into a data access object should use a specific connection from the pool, not one taken at random?
In other words, the requirement is to initialize specific connections in the pool (so these connections see the database pre-configured in various states), to then 'label' these connections and to then get EntityManager / the transaction to use the connection with a specific label.
I know that Oracle UCP offers similar functionality, but we have had issues with Oracle UCP so we want to do the same thing with the Tomcat pool.
Thanks !
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules