openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <>
Subject [jira] Created: (OPENJPA-116) EntityManager.getDelegate should throw an IllegalStateException
Date Mon, 29 Jan 2007 22:29:49 GMT
EntityManager.getDelegate should throw an IllegalStateException 

                 Key: OPENJPA-116
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Michael Dick
            Priority: Minor

EntityManager.getDelegate() should throw an IllegalStateException if the EntityManager has
been closed. 

I noticed then when debugging other problems. According to the javadoc
we need to throw an exception if the EM has been closed. 

In case I missed anything here's what I did to reproduce the problem. 

        EntityManagerFactory _emf = Persistence.createEntityManagerFactory("test");

        EntityManager em = _emf.createEntityManager();


        try {
            Object o = em.getDelegate();
        catch(IllegalStateException ise) {
            System.out.println("Caught expected exception");

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message