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;
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;
/**
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);
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
@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