|Re: Noob Problem: ClientSession.getAccessors() returns null [message #902212 is a reply to message #901972]
||Thu, 16 August 2012 11:53
| Stephan Gross
Registered: August 2012
we found the culprit in our code.
The application employs several DAO objects that use the EclipseLink session internally (acquired in the constructor).
For complex scenarios the DAOs can cooperate and share a session.
The DAOs offer a close() method that releases the EL session and UnitOfWork (if any exists) this close method is usually called after the work is done. However, to prevent resource leakage, the DAOs have a finally method implementation that calls close.
In some places, the cooperation was not fully established (requires two method calls), so that two DAOs shared a session and both thought they were responsible for the session's release. When one DAO was going out of scope and the Finalizer thread called the finalize method, while the normal request thread was committing the same session, the NPE on DatasourceCallQueryMechanism l.773 resulted.
A retest with the earlier release EclipseLink 2.1.2 did not reproduce the same bug as easily but lead to the following exception:
Exception [EclipseLink-4022] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Accessor or its connection has been set to null. This can occur if the ClientSession or UnitOfWork was released in a seperate thread, for instance if a Timeout occurred.
Powered by FUDForum
. Page generated in 0.22469 seconds