Bug 296961

Summary: Server testing uses transaction entity manager which mismatches assumptions made be tests
Product: z_Archived Reporter: Tom Ware <tom.ware>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: kevin.yuan, yiping.zhao
Version: unspecifiedKeywords: test
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 296178    
Attachments:
Description Flags
patch for the bug none

Description Tom Ware CLA 2009-12-04 14:59:02 EST
The server testing framework for EclipseLink injects an entity manager using the defaults.  This results in a transaction entity manager.

The JPA tests are written in Java SE and expect an extended persistence context - with much more transactional control.

This mismatch between assumptions needs to be corrected by either changing the test framework or the tests themselves.

This mismatch results in a number of test errors that are difficult to diagnose and a number of bugs are being set as duplicates of this bug.  When the issue is corrected, these tests should be rerun to see if there are still issues.
Comment 1 Tom Ware CLA 2009-12-04 15:00:16 EST
*** Bug 296747 has been marked as a duplicate of this bug. ***
Comment 2 Tom Ware CLA 2009-12-04 15:01:15 EST
*** Bug 296389 has been marked as a duplicate of this bug. ***
Comment 3 Tom Ware CLA 2009-12-04 15:01:20 EST
*** Bug 296388 has been marked as a duplicate of this bug. ***
Comment 4 Tom Ware CLA 2009-12-04 15:01:27 EST
*** Bug 296387 has been marked as a duplicate of this bug. ***
Comment 5 Tom Ware CLA 2009-12-04 15:01:32 EST
*** Bug 296381 has been marked as a duplicate of this bug. ***
Comment 6 Tom Ware CLA 2009-12-04 15:01:36 EST
*** Bug 296380 has been marked as a duplicate of this bug. ***
Comment 7 Tom Ware CLA 2009-12-04 15:01:41 EST
*** Bug 296376 has been marked as a duplicate of this bug. ***
Comment 8 Kevin Yuan CLA 2010-02-10 15:21:06 EST
Created attachment 158772 [details]
patch for the bug
Comment 9 Kevin Yuan CLA 2010-02-10 15:22:32 EST
Clone an TestRunnerBean.java without EntityManager injected, all nonJTA datasource or application managed EntityManager inside container testing should this TestRunnerBean.

Code Reviewed by Yiping Zhao.
Checked in trunk, revision: 6579.
Comment 10 Kevin Yuan CLA 2010-02-11 14:14:47 EST
Need to back port to 2.0.2 after 2.0.1 release and the branch is open to check in.
Comment 11 Kevin Yuan CLA 2010-02-19 15:36:50 EST
Backport to 2.0.2, revision: 6634.
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:31:18 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink