[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] EclipseLink lockup in exclusive isolated session mode
|
Hello,
I am experiencing a critical issue when using the exclusive isolated
session mode which results in a lockup during a database call.
To reproduce it, do the following:
1. Enable exclusive isolated session mode (property
eclipselink.jdbc.exclusive-connection.mode = Always) and use the
external connection pool mode
2. Use a non-JTA Datasource
3. Begin EntityManager transaction
4. Do a JPA Operation (e.g. find())
5. Commit the EntityManager transaction
6. Repeat steps 3-5 several times (ca. 50)
=> database call will lock.
I investigated this issue and it seems that a EntityManager
transaction commit will not release the connection hold by the
exclusive isolated client session (which is fine and expected).
But, due to the "resetted" transaction it will acquire a new one than
re-using the acquired one.
After some iterations, maxNumberOfNonPooledConnections will be
exceeded, which will end up that the ServerSession will wait forever
for obtaining a new connection in the wait() call.
Here's the stacktrace for the issue:
Thread [Thread-3] (Suspended)
waiting for: ServerSession (id=313)
Object.wait(long) line: not available [native method]
ServerSession(Object).wait() line: 474
ServerSession.acquireClientConnection(ClientSession) line: 268
ExclusiveIsolatedClientSession(ClientSession).basicBeginTransaction()
line: 123
ExclusiveIsolatedClientSession(AbstractSession).beginTransaction() line: 552
RepeatableWriteUnitOfWork(UnitOfWorkImpl).beginTransaction() line: 509
RepeatableWriteUnitOfWork(UnitOfWorkImpl).beginEarlyTransaction() line: 499
EJBQueryImpl.executeReadQuery() line: 383
EJBQueryImpl.getResultList() line: 568
...
And I've got another question: will EntityManager.close()
release/close the acquired connection in the exclusive isolated mode?
I really appreciate your help.
Best regards,
Patric