Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Using Connection Pools across sessions

There is no standard way to share an internal connection pool.
Your best solution is probably to use a third party DataSource, and share
that across your ServerSessions.  If you are using an app server, it will
have its own DataSources, otherwise there are many generic data source
implementations such as Oracle DataSource, Oracle UCP, or c3po, etc.

You could also create a single ConnectionPool object and explicitly set it
into each of your ServerSessions.  This should work, but note that when you
disconnect one server, it will disconnect the pool.



Rohit Banga-2 wrote:
> 
> Hi All
> 
> Consider the following usecase.
> I have a single database for which multiple table configurations have 
> been defined. Each different configuration is associated with a 
> different Server Session. From the server session, I get the entity 
> manager factory which gives me a JPA Dynamic Helper. So far so good, but 
> I want to have a single connection pool and share it among different 
> sessions. If I share the same connection pool object between multiple 
> server session objects, I get some exceptions because of the conflicting 
> configuration definition.
> 
> What is the standard way of sharing the connection pool across different 
> sessions?
> 
> 
> -- 
> Thanks and Regards
> Rohit Banga
> Member Technical Staff
> Oracle Server Technologies
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/Using-Connection-Pools-across-sessions-tp30922054p30936640.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top