Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Small clarification needed on server session usage

One advantage of using serverSession even with a third party data source can be that there will be a shared cache for all client sessions. Other than that anything else?

On 3/6/2011 6:23 PM, Rohit Banga wrote:
Hi All     Based on the wiki we have the following facts: 1. A database session should typically be used with a two tier application.
2. For three tier applications we should get a server session from EntityManagerFactory and then for each subsequent request we should acquire a client session and then if required a unit of work from the client session; subsequently releasing the client session. This allows us to reuse connections pooled by the server session. But what happens when we use a third party datasource. The connection pool is not owned by the server session. so each acquireClientSession() will request a connection from the datasource. In this case does it really matter whether we use a database session or a server session?
As a side note, in some of the previous posts I have read that an EntityManager is not thread safe. What about server session? Is it thread safe?
Thanks Rohit Banga
_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

--
Thanks and Regards
Rohit Banga
Member Technical Staff
Oracle Server Technologies

Back to the top