From: erik Date: Sun, 4 Apr 2010 12:05:38 +0000 (+0000) Subject: changes for eclipse-link X-Git-Tag: wamblee-utils-0.2~1^2~42 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=17dfa23ca542c343855a18ae569afca85eb08d75;p=utils changes for eclipse-link --- diff --git a/support/test/src/main/java/org/wamblee/support/persistence/JpaBuilder.java b/support/test/src/main/java/org/wamblee/support/persistence/JpaBuilder.java index e6943197..8b6e3399 100644 --- a/support/test/src/main/java/org/wamblee/support/persistence/JpaBuilder.java +++ b/support/test/src/main/java/org/wamblee/support/persistence/JpaBuilder.java @@ -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); diff --git a/support/test/src/main/java/org/wamblee/support/persistence/toplink/JndiSessionCustomizer.java b/support/test/src/main/java/org/wamblee/support/persistence/toplink/JndiSessionCustomizer.java index 814fe593..541eb504 100644 --- a/support/test/src/main/java/org/wamblee/support/persistence/toplink/JndiSessionCustomizer.java +++ b/support/test/src/main/java/org/wamblee/support/persistence/toplink/JndiSessionCustomizer.java @@ -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 diff --git a/support/test/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java b/support/test/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java index 5ba15e84..fb4c681c 100644 --- a/support/test/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java +++ b/support/test/src/main/java/org/wamblee/support/persistence/toplink/ToplinkJpaCustomizer.java @@ -15,11 +15,11 @@ public class ToplinkJpaCustomizer implements JpaCustomizer { @Override public void customize(PersistenceUnitDescription aPersistenceUnit, Map 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