changes for eclipse-link
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 4 Apr 2010 12:05:38 +0000 (12:05 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Sun, 4 Apr 2010 12:05:38 +0000 (12:05 +0000)
support/test/src/main/java/org/wamblee/support/persistence/JpaBuilder.java
support/test/src/main/java/org/wamblee/support/persistence/toplink/JndiSessionCustomizer.java
support/test/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java

index e6943197b85e66ca18cbb4eee8dcb3e96bba4387..8b6e339935f01206ee3f795e16a8df4be49beeed 100644 (file)
@@ -1,8 +1,6 @@
 package org.wamblee.support.persistence;
 
-import java.sql.SQLException;
 import java.util.Map;
-import java.util.ServiceLoader;
 import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -15,9 +13,7 @@ import javax.persistence.EntityTransaction;
 import javax.persistence.Persistence;
 import javax.sql.DataSource;
 
-import org.hibernate.ejb.HibernatePersistence;
 import org.wamblee.support.jndi.StubInitialContextFactory;
-import org.wamblee.support.persistence.toplink.JndiSessionCustomizer;
 
 
 /**
@@ -105,7 +101,7 @@ public class JpaBuilder {
        
                JpaCustomizerBuilder.getCustomizer().customize(persistenceUnit, jpaProps);
                
-               jpaProps.put("javax.persistence.provider", HibernatePersistence.class.getName() +"unknown");
+               //jpaProps.put("javax.persistence.provider", HibernatePersistence.class.getName());
                EntityManagerFactory factory = Persistence.createEntityManagerFactory(persistenceUnit
                                .getUnitName(), jpaProps);
                
index 814fe5933145a61fb31ec659c4116f0997de4f8d..541eb50434b670d162451e6a6ee92f67b15ce78c 100644 (file)
@@ -3,11 +3,11 @@ package org.wamblee.support.persistence.toplink;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 
-import oracle.toplink.essentials.jndi.JNDIConnector;
-import oracle.toplink.essentials.sessions.DatabaseLogin;
-import oracle.toplink.essentials.sessions.Session;
-import oracle.toplink.essentials.threetier.ServerSession;
-import oracle.toplink.essentials.tools.sessionconfiguration.SessionCustomizer;
+import org.eclipse.persistence.config.SessionCustomizer;
+import org.eclipse.persistence.sessions.DatabaseLogin;
+import org.eclipse.persistence.sessions.JNDIConnector;
+import org.eclipse.persistence.sessions.Session;
+import org.eclipse.persistence.sessions.server.ServerSession;
  
 /**
  * See http://wiki.eclipse.org/Customizing_the_EclipseLink_Application_(ELUG) Use for clients that would like to use a
index 5ba15e840ba1d0163dab7bad3fcacfe920c3e71a..fb4c681c4339fab0b78a7d97f4f07dcd82b16f28 100644 (file)
@@ -15,11 +15,11 @@ public class ToplinkJpaCustomizer implements JpaCustomizer {
     @Override
     public void customize(PersistenceUnitDescription aPersistenceUnit, Map<String, String> aJpaProperties) {
         // Hack to make JNDI lookup of the datasource work with toplink
-        aJpaProperties.put("toplink.session.customizer", JndiSessionCustomizer.class
+        aJpaProperties.put("eclipselink.session.customizer", JndiSessionCustomizer.class
                 .getName());
         
         // DDL generation for toplink
-        aJpaProperties.put("toplink.ddl-generation", "create-tables");   
+        aJpaProperties.put("eclipselink.ddl-generation", "create-tables");   
     }
     
     @Override