Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [gemini-dev] Connection Pooling with EclipseLink and Gemini JPA

Hi Adrian,

While it is possible for Gemini to do the pooling in the PlainDriverDS, it's not really something that Gemini is in the business of doing. Gemini is only creating this data source in order to make use of the DataSourceFactory from DBAccess to give EclipseLink something to get connections from.

Getting EclipseLink to do it seems like it would be the most intuitive, but support for that would need to be added since EclipseLink does not currently do connection pooling on a data source handed to it. (Shouldn't, in theory, be too hard to do, though.)

Letting the server do it would probably be the best and easiest way to do it. The hitch is, of course, that we would need to do something about the bug that you reference and find a way to get a server data source to Gemini JPA.

A fourth quick and dirty option would be for the DBAccess impl to do it, returning a Driver wrapper object from createDriver() that vended out connections. Not very elegant, though, and even worse when you think that the driver layer would be providing a Driver wrapper, which would be wrapped by a Gemini JPA DataSource wrapper, all so that EclipseLink can call getConnection() on it, while there is a perfectly good PooledConnectionDataSource protocol available but unused!

-Mike

On 5/24/2011 6:58 AM, Goerler, Adrian wrote:

Hi Shaun, Mike, others

 

we would like to provide connection pooling with EclipseLink and Gemini JPA.

 

My understanding is that Gemini JPA will create a “PlainDriverDataSource” from connection data and pass it to EclipseLink.

 

I see three possible options to enable connection pooling in this scenario:

 

1)      EclipseLink does the pooling: We configure EclipseLink to use an “internal connection pool”. However, I don’t know if this is possible if the EMF is configured with an external data source. Is this actually possible?

2)      Gemini JPA does the pooling: Gemini JPA provides some connection pooling capability.

3)      The server or application does the pooling: We pass a data source that is capable of connection pooling to Gemini JPA, and Gemini JPA passes it on to EclipseLink. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=335983).

 

What do you think of these options?

 

-Adrian

 

 

Adrian Görler
SAP AG

Pflichtangaben/Mandatory Disclosure Statements:
http://www.sap.com/company/legal/impressum.epx

 

_______________________________________________ gemini-dev mailing list gemini-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/gemini-dev

Back to the top