View | Details | Raw Unified | Return to bug 292951 | Differences between
and this patch

Collapse All | Expand All

(-)AdvancedJPAJunitTest.java (-1 / +1 lines)
Lines 189-195 Link Here
189
    public void testMetamodelMinimalSanityTest() {
189
    public void testMetamodelMinimalSanityTest() {
190
        // Run test only when the JPA 2.0 specification is enabled on the server, or we are in SE mode with JPA 2.0 capability
190
        // Run test only when the JPA 2.0 specification is enabled on the server, or we are in SE mode with JPA 2.0 capability
191
        if(!this.isJPA10()) {
191
        if(!this.isJPA10()) {
192
            EntityManager em = createEntityManager("default1");
192
            EntityManager em = createEntityManager();
193
            // pre-clear metamodel to enable test reentry (SE only - not EE)
193
            // pre-clear metamodel to enable test reentry (SE only - not EE)
194
            if(!this.isOnServer()) {
194
            if(!this.isOnServer()) {
195
                ((EntityManagerFactoryImpl)((EntityManagerImpl)em).getEntityManagerFactory()).setMetamodel(null);
195
                ((EntityManagerFactoryImpl)((EntityManagerImpl)em).getEntityManagerFactory()).setMetamodel(null);
(-)compositepk/AdvancedCompositePKJunitTest.java (-1 / +1 lines)
Lines 649-655 Link Here
649
        // Don't run this test in a JPA 1.0 environment.
649
        // Don't run this test in a JPA 1.0 environment.
650
        if (! isJPA10()) {
650
        if (! isJPA10()) {
651
            EntityManagerFactory emf = getEntityManagerFactory();
651
            EntityManagerFactory emf = getEntityManagerFactory();
652
            EntityManager em = emf.createEntityManager();
652
            EntityManager em = createEntityManager();
653
            beginTransaction(em);
653
            beginTransaction(em);
654
            try{
654
            try{
655
                DepartmentPK pk = new DepartmentPK("DEPT B", "ROLE B", "LOCATION B");
655
                DepartmentPK pk = new DepartmentPK("DEPT B", "ROLE B", "LOCATION B");
(-)EntityManagerJUnitTestSuite.java (-17 / +6 lines)
Lines 143-156 Link Here
143
        suite.setName("EntityManagerJUnitTestSuite");
143
        suite.setName("EntityManagerJUnitTestSuite");
144
        
144
        
145
        suite.addTest(new EntityManagerJUnitTestSuite("testSetup"));
145
        suite.addTest(new EntityManagerJUnitTestSuite("testSetup"));
146
        
147
        suite.addTest(new EntityManagerJUnitTestSuite("testIsLoaded"));
148
        suite.addTest(new EntityManagerJUnitTestSuite("testIsLoadedAttribute"));
149
        suite.addTest(new EntityManagerJUnitTestSuite("testGetIdentifier"));
150
        suite.addTest(new EntityManagerJUnitTestSuite("testIsLoadedWithReference"));
151
        suite.addTest(new EntityManagerJUnitTestSuite("testIsLoadedWithoutReference"));
152
        suite.addTest(new EntityManagerJUnitTestSuite("testIsLoadedWithoutReferenceAttribute"));
153
        
154
        suite.addTest(new EntityManagerJUnitTestSuite("testWeaving"));
146
        suite.addTest(new EntityManagerJUnitTestSuite("testWeaving"));
155
        suite.addTest(new EntityManagerJUnitTestSuite("testClearEntityManagerWithoutPersistenceContext"));
147
        suite.addTest(new EntityManagerJUnitTestSuite("testClearEntityManagerWithoutPersistenceContext"));
156
        suite.addTest(new EntityManagerJUnitTestSuite("testUpdateAllProjects"));
148
        suite.addTest(new EntityManagerJUnitTestSuite("testUpdateAllProjects"));
Lines 8576-8582 Link Here
8576
        // Don't run this test in a JPA 1.0 environment.
8568
        // Don't run this test in a JPA 1.0 environment.
8577
        if (! isJPA10()) {
8569
        if (! isJPA10()) {
8578
            EntityManagerFactory emf = getEntityManagerFactory();
8570
            EntityManagerFactory emf = getEntityManagerFactory();
8579
            EntityManager em = emf.createEntityManager();
8571
            EntityManager em = createEntityManager();
8580
            beginTransaction(em);
8572
            beginTransaction(em);
8581
            try{
8573
            try{
8582
                Employee emp = new Employee();
8574
                Employee emp = new Employee();
Lines 8610-8616 Link Here
8610
        // Don't run this test in a JPA 1.0 environment.
8602
        // Don't run this test in a JPA 1.0 environment.
8611
        if (! isJPA10()) {
8603
        if (! isJPA10()) {
8612
            EntityManagerFactory emf = getEntityManagerFactory();
8604
            EntityManagerFactory emf = getEntityManagerFactory();
8613
            EntityManager em = emf.createEntityManager();
8605
            EntityManager em = createEntityManager();
8614
            beginTransaction(em);
8606
            beginTransaction(em);
8615
            try{
8607
            try{
8616
                Employee emp = new Employee();
8608
                Employee emp = new Employee();
Lines 8657-8663 Link Here
8657
        // Don't run this test in a JPA 1.0 environment.
8649
        // Don't run this test in a JPA 1.0 environment.
8658
        if (! isJPA10()) {
8650
        if (! isJPA10()) {
8659
            EntityManagerFactory emf = getEntityManagerFactory();
8651
            EntityManagerFactory emf = getEntityManagerFactory();
8660
            EntityManager em = emf.createEntityManager();
8652
            EntityManager em = createEntityManager();
8661
            beginTransaction(em);
8653
            beginTransaction(em);
8662
            try{
8654
            try{
8663
                Employee emp = new Employee();
8655
                Employee emp = new Employee();
Lines 8690-8697 Link Here
8690
    }
8682
    }
8691
    
8683
    
8692
    public void testIsLoadedWithReference(){
8684
    public void testIsLoadedWithReference(){
8693
        EntityManagerFactory emf = getEntityManagerFactory();
8685
        EntityManager em = createEntityManager();
8694
        EntityManager em = emf.createEntityManager();
8695
        beginTransaction(em);
8686
        beginTransaction(em);
8696
        try{
8687
        try{
8697
            Employee emp = new Employee();
8688
            Employee emp = new Employee();
Lines 8738-8745 Link Here
8738
    }
8729
    }
8739
    
8730
    
8740
    public void testIsLoadedWithoutReference(){
8731
    public void testIsLoadedWithoutReference(){
8741
        EntityManagerFactory emf = getEntityManagerFactory();
8732
        EntityManager em = createEntityManager();
8742
        EntityManager em = emf.createEntityManager();
8743
        beginTransaction(em);
8733
        beginTransaction(em);
8744
        try{
8734
        try{
8745
            Employee emp = new Employee();
8735
            Employee emp = new Employee();
Lines 8787-8794 Link Here
8787
    }
8777
    }
8788
    
8778
    
8789
    public void testIsLoadedWithoutReferenceAttribute(){
8779
    public void testIsLoadedWithoutReferenceAttribute(){
8790
        EntityManagerFactory emf = getEntityManagerFactory();
8780
        EntityManager em = createEntityManager();
8791
        EntityManager em = emf.createEntityManager();
8792
        beginTransaction(em);
8781
        beginTransaction(em);
8793
        try{
8782
        try{
8794
            Employee emp = new Employee();
8783
            Employee emp = new Employee();

Return to bug 292951