[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Small clarification needed on server session usage
|
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