Bug 292695 - need to change JPA testframework to support getting entitymanager from injection and jndi lookup both
Summary: need to change JPA testframework to support getting entitymanager from inject...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-10-19 14:18 EDT by Yiping Zhao CLA
Modified: 2022-06-09 10:03 EDT (History)
2 users (show)

See Also:


Attachments
this patch will add support for jpa testframework to be able to run tests on server against entity manager from injection and jndi lookup both (5.16 KB, patch)
2009-10-19 15:03 EDT, Yiping Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yiping Zhao CLA 2009-10-19 14:18:39 EDT
By default or set ejb.lookup=false in test.properties, the jpa tests will run against injected entity manager factory and entity manager, by setting ejb.lookup=true in test.properties, the tests will run against entity manager factory and entity manager from jndi lookup.

The changed files are:

test.properties: 
               add ejb.lookup property

weblogic.xml:    
               add <sysproperty key="ejb.lookup" value="${ejb.lookup}"/> to "weblogic-start-nosleep" target

ejb-jar.xml:
               change persistence-context-ref-name to point "persistence/default/entity-manager", change persistence-unit-ref-name to "persistence/default/factory"

org.eclipse.persistence.testing.framework.server.JEEPlatform:
               change getEntityManager() and getEntityManagerFactory() to add condition about injection and jndi lookup
Comment 1 Yiping Zhao CLA 2009-10-19 15:03:02 EDT
Created attachment 149909 [details]
this patch will add support for jpa testframework to be able to run tests on server against entity manager from injection and jndi lookup both
Comment 2 Yiping Zhao CLA 2009-10-19 15:06:07 EDT
checked in patch in Main as revision 5581.
Comment 3 Yiping Zhao CLA 2009-10-19 15:31:38 EDT
code reviewed by James Sutherland & Edwin Tang.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:03:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink