Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366427 - EntityManagerFactory.getPersistenceUnitUtil() does not throw IllegalStateException when the entity manager factory has been closed
Summary: EntityManagerFactory.getPersistenceUnitUtil() does not throw IllegalStateExce...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Tom Ware CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 10:56 EST by Stephen DiMilla CLA
Modified: 2022-06-09 10:06 EDT (History)
3 users (show)

See Also:


Attachments
proposed fix (16.19 KB, application/octet-stream)
2013-02-05 10:19 EST, Tom Ware CLA
no flags Details
additional patch (2.25 KB, patch)
2013-02-20 10:06 EST, Tom Ware CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen DiMilla CLA 2011-12-12 10:56:41 EST
Build Identifier: eclipselink-2.3.0.v20110604-r9504

Client code:

           EntityManagerFactory emf = em.getEntityManagerFactory();
            emf.close();
            try {
                System.out.println("call getPersistenceUnitUtil() after close");
                emf.getPersistenceUnitUtil();
                System.out.println("IllegalStateException not thrown");
            } catch (IllegalStateException ise) {
                System.out.println("Received expected IllegalStateException");
            }
--------------
output:

call getPersistenceUnitUtil() after close
IllegalStateException not thrown


Reproducible: Always
Comment 1 Tom Ware CLA 2012-04-05 11:01:23 EDT
Updating target milestone.
Comment 2 Tom Ware CLA 2013-02-05 10:19:50 EST
Created attachment 226572 [details]
proposed fix
Comment 3 Tom Ware CLA 2013-02-05 11:50:10 EST
Bugs 366407, 366427, 366464, 382537 fixed in same transaction

Reviewed by Guy Pelletier

Tests added to JPA 2.1 test suites, QueryTestSuite, EntityManagerTestSuite and EntityManagerFactoryTestSuite

Tested with JPA LRG
Comment 4 Tom Ware CLA 2013-02-20 10:06:43 EST
Created attachment 227338 [details]
additional patch
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:06:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink