geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r604319 - /geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Date Fri, 14 Dec 2007 22:35:19 GMT
Author: dblevins
Date: Fri Dec 14 14:35:19 2007
New Revision: 604319

URL: http://svn.apache.org/viewvc?rev=604319&view=rev
Log:
Hook up the new persistence unit processing code.

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?rev=604319&r1=604318&r2=604319&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Fri Dec 14 14:35:19 2007
@@ -85,7 +85,6 @@
     private final Assembler assembler;
     private final Set<String> registeredResouceAdapters = new TreeSet<String>();
     private final ConcurrentMap<String,ResourceAdapterWrapper> processedResourceAdapterWrappers
=  new ConcurrentHashMap<String,ResourceAdapterWrapper>() ;
-    private final Collection<PersistenceUnitGBean> persistenceUnitGBeans;
     private final Kernel kernel;
     private final ClassLoader classLoader;
     // These are provided by the corba subsystem when it first initializes.  
@@ -98,11 +97,7 @@
     public OpenEjbSystemGBean(TransactionManager transactionManager, Collection<ResourceAdapterWrapper>
resourceAdapters, Collection<PersistenceUnitGBean> persistenceUnitGBeans, Kernel kernel,
ClassLoader classLoader) throws Exception {
         this.kernel = kernel;
         this.classLoader = classLoader;
-        if (persistenceUnitGBeans == null) {
-            this.persistenceUnitGBeans = Collections.emptySet();
-        } else {
-            this.persistenceUnitGBeans = persistenceUnitGBeans;
-        }
+
         System.setProperty("duct tape","");
         System.setProperty("admin.disabled", "true");
         System.setProperty("openejb.logger.external", "true");
@@ -154,6 +149,7 @@
 
         // process all resource adapters
         processResourceAdapterWrappers(resourceAdapters);
+        processPersistenceUnitGBeans(persistenceUnitGBeans);
     }
 
     private void setDefaultProperty(String key, String value) {
@@ -394,15 +390,6 @@
 
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         Thread.currentThread().setContextClassLoader(classLoader);
-        LinkResolver<EntityManagerFactory> emfLinkResolver = new UniqueDefaultLinkResolver<EntityManagerFactory>();
-        for (PersistenceUnitGBean persistenceUnitGBean: persistenceUnitGBeans) {
-            EntityManagerFactory factory = persistenceUnitGBean.getEntityManagerFactory();
-            String persistenceUnitRoot = persistenceUnitGBean.getPersistenceUnitRoot();
-            String persistenceUnitName = persistenceUnitGBean.getPersistenceUnitName();
-            if (!"cmp".equals(persistenceUnitName)) {
-                emfLinkResolver.add(persistenceUnitRoot, persistenceUnitName, factory);
-            }
-        }
         try {
             assembler.createEjbJar(ejbJarInfo, classLoader);
         } finally {



Mime
View raw message