quality@glassfish.java.net

Issue with EclipseLink

From: Janos Cserep <cserepj_at_metaprime.hu>
Date: Sat, 7 Nov 2009 03:32:32 +0100

I've upgraded a production server to b70 and noticed a new issue with
EclipseLink I had not seen before:

Caused by: java.lang.IllegalStateException: Attempting to execute an
operation on a closed EntityManager.
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.verifyOpen(EntityManagerImpl.java:1430)
        at org.eclipse.persistence.internal.jpa.EJBQueryImpl.setFirstResult(EJBQueryImpl.java:779)
        at org.eclipse.persistence.internal.jpa.EJBQueryImpl.setFirstResult(EJBQueryImpl.java:71)
        at hu.metaprime.cms.dao.BaseJpaDao.find(BaseJpaDao.java:57)

The exception seems to occur in methods where an injected/JNDI looked
up EntityManager is used without a JTA transaction (mostly finder and
query methods).

When only a single thread is active (during development) I didn not
see the issue, but when I hit glassfish simulteanously with multiple
threads, there's a chance of this occuring.

Before the upgrade the server was running b66 - I quickly reverted to
a pre-upgrade ZFS snapshot on the server.

Is this a known issue, or should I file a bug?

Janos