geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r946478 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ gero...
Date Wed, 19 May 2010 23:25:04 GMT
Author: djencks
Date: Wed May 19 23:25:04 2010
New Revision: 946478

URL: http://svn.apache.org/viewvc?rev=946478&view=rev
Log:
GERONIMO-4918 jndi construction requires rearranging the references

Removed:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java
Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EntityDeploymentGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/MessageDrivenDeploymentGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatefulDeploymentGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessDeploymentGBean.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Wed May 19 23:25:04 2010
@@ -426,8 +426,10 @@ public class EjbDeploymentBuilder {
                 geronimoOpenejb,
                 ejbModule, buildingContext);
 
-        Map<String, Object> compContext = jndiContext.get(JndiScope.comp);
-        gbean.setAttribute("componentContextMap", compContext);
+        AbstractName applicationJndiName = (AbstractName)earContext.getGeneralData().get(EARContext.APPLICATION_JNDI_NAME_KEY);
+        gbean.setReferencePattern("ApplicationJndi", applicationJndiName);
+        gbean.setAttribute("moduleContextMap", jndiContext.get(JndiScope.module));
+        gbean.setAttribute("componentContextMap", jndiContext.get(JndiScope.comp));
 
         //
         // Process resource refs

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Wed May 19 23:25:04 2010
@@ -820,8 +820,6 @@ public class EjbModuleBuilder implements
             ejbModuleGBeanData.setAttribute("ejbJarInfo", ejbModule.getEjbJarInfo());
             ejbModuleGBeanData.setAttribute("modulePath", ejbModule.getTargetPath());
             ejbModuleGBeanData.setAttribute("moduleContext", moduleContext);
-            AbstractName applicationJndiName = (AbstractName)earContext.getGeneralData().get(EARContext.APPLICATION_JNDI_NAME_KEY);

-            ejbModuleGBeanData.setReferencePattern("ApplicationJndi", applicationJndiName);
             earContext.addGBean(ejbModuleGBeanData);
         } catch (Exception e) {
             throw new DeploymentException("Unable to initialize EJBModule GBean " + ejbModuleGBeanData.getAbstractName(),
e);

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-clustering-wadi/src/main/java/org/apache/geronimo/openejb/cluster/stateful/deployment/ClusteredStatefulDeployment.java
Wed May 19 23:25:04 2010
@@ -22,18 +22,20 @@ package org.apache.geronimo.openejb.clus
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.Context;
 import org.apache.geronimo.clustering.SessionManager;
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.GBean;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.j2ee.jndi.ApplicationJndi;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.openejb.EjbDeployment;
-import org.apache.geronimo.openejb.EjbDeploymentGBean;
-import org.apache.geronimo.openejb.EjbModuleImpl;
 import org.apache.geronimo.openejb.OpenEjbSystem;
 import org.apache.geronimo.openejb.cluster.infra.SessionManagerTracker;
+import org.apache.geronimo.security.SecurityNames;
 import org.apache.geronimo.security.jacc.RunAsSource;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.Container;
@@ -42,38 +44,35 @@ import org.apache.openejb.core.CoreDeplo
 /**
  * @version $Rev:$ $Date:$
  */
+@GBean(j2eeType = NameFactory.STATEFUL_SESSION_BEAN)
 public class ClusteredStatefulDeployment extends EjbDeployment {
 
     private final SessionManager sessionManager;
 
-//    public ClusteredStatefulDeployment() throws LoginException {
-//        sessionManager = null;
-//    }
-
-    public ClusteredStatefulDeployment(String objectName,
-                                       String deploymentId,
-                                       String ejbName,
-                                       String homeInterfaceName,
-                                       String remoteInterfaceName,
-                                       String localHomeInterfaceName,
-                                       String localInterfaceName,
-                                       String serviceEndpointInterfaceName,
-                                       String beanClassName,
-                                       ClassLoader classLoader,
-                                       boolean securityEnabled,
-                                       String defaultRole,
-                                       String runAsRole,
-                                       RunAsSource runAsSource,
-                                       Context componentContext,
-                                       Set<String> unshareableResources,
-                                       Set<String> applicationManagedSecurityResources,
-                                       TrackedConnectionAssociator trackedConnectionAssociator,
-//                                       GeronimoTransactionManager transactionManager,
-                                       OpenEjbSystem openEjbSystem,
-                                       SessionManager sessionManager//,
-//                                       EjbModuleImpl ejbModule,
-//                                       Kernel kernel
-    ) throws Exception {
+    public ClusteredStatefulDeployment(@ParamSpecial(type = SpecialAttributeType.objectName)
String objectName,
+                         @ParamAttribute(name = "deploymentId") String deploymentId,
+                         @ParamAttribute(name = "ejbName") String ejbName,
+                         @ParamAttribute(name = "homeInterfaceName") String homeInterfaceName,
+                         @ParamAttribute(name = "remoteInterfaceName") String remoteInterfaceName,
+                         @ParamAttribute(name = "localHomeInterfaceName") String localHomeInterfaceName,
+                         @ParamAttribute(name = "localInterfaceName") String localInterfaceName,
+                         @ParamAttribute(name = "serviceEndpointInterfaceName") String serviceEndpointInterfaceName,
+                         @ParamAttribute(name = "beanClassName") String beanClassName,
+                         @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader
classLoader,
+                         @ParamAttribute(name = "securityEnabled") boolean securityEnabled,
+                         @ParamAttribute(name = "defaultRole") String defaultRole,
+                         @ParamAttribute(name = "runAsRole") String runAsRole,
+                         @ParamReference(name = "RunAsSource", namingType = SecurityNames.JACC_MANAGER)
RunAsSource runAsSource,
+                         @ParamReference(name = "ApplicationJndi", namingType = "GBEAN")
ApplicationJndi applicationJndi,
+                         @ParamAttribute(name = "moduleContextMap") Map<String, Object>
moduleJndi,
+                         @ParamAttribute(name = "componentContextMap") Map<String, Object>
compContext,
+                         @ParamAttribute(name = "unshareableResources") Set<String>
unshareableResources,
+                         @ParamAttribute(name = "applicationManagedSecurityResources") Set<String>
applicationManagedSecurityResources,
+                         @ParamReference(name = "OpenEjbSystem") TrackedConnectionAssociator
trackedConnectionAssociator,
+                         @ParamReference(name = "TransactionManager") GeronimoTransactionManager
transactionManager,
+                         @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
+                         @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel,
+                         @ParamReference(name = GBEAN_REF_SESSION_MANAGER) SessionManager
sessionManager) throws Exception {
         super(objectName,
                 deploymentId,
                 ejbName,
@@ -88,11 +87,15 @@ public class ClusteredStatefulDeployment
                 defaultRole,
                 runAsRole,
                 runAsSource,
-                componentContext,
+                applicationJndi,
+                moduleJndi,
+                compContext,
                 unshareableResources,
                 applicationManagedSecurityResources,
                 trackedConnectionAssociator,
-                openEjbSystem);
+                transactionManager,
+                openEjbSystem,
+                kernel);
         if (null == sessionManager) {
             throw new IllegalArgumentException("sessionManager is required");
         }
@@ -131,53 +134,6 @@ public class ClusteredStatefulDeployment
         super.destroy();
     }
 
-    public static final GBeanInfo GBEAN_INFO;
-
     public static final String GBEAN_REF_SESSION_MANAGER = "SessionManager";
 
-    static {
-        GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(ClusteredStatefulDeployment.class,
-                ClusteredStatefulDeployment.class,
-                EjbDeploymentGBean.GBEAN_INFO,
-                NameFactory.STATEFUL_SESSION_BEAN);
-
-        builder.addReference(GBEAN_REF_SESSION_MANAGER, SessionManager.class, GBeanInfoBuilder.DEFAULT_J2EE_TYPE);
-
-        builder.setConstructor(new String[]{"objectName",
-                "deploymentId",
-                "ejbName",
-
-                "homeInterfaceName",
-                "remoteInterfaceName",
-                "localHomeInterfaceName",
-                "localInterfaceName",
-                "serviceEndpointInterfaceName",
-                "beanClassName",
-                "classLoader",
-
-                "securityEnabled",
-                "defaultRole",
-                "runAsRole",
-                "RunAsSource",
-
-                "componentContextMap",
-
-                "unshareableResources",
-                "applicationManagedSecurityResources",
-                "TrackedConnectionAssociator",
-                "TransactionManager",
-
-                "OpenEjbSystem",
-                GBEAN_REF_SESSION_MANAGER,
-
-                "kernel"
-        });
-
-        GBEAN_INFO = builder.getBeanInfo();
-    }
-
-    public static GBeanInfo getGBeanInfo() {
-        return GBEAN_INFO;
-    }
-
 }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Wed May 19 23:25:04 2010
@@ -18,6 +18,8 @@
 package org.apache.geronimo.openejb;
 
 import java.lang.reflect.Method;
+import java.util.LinkedHashSet;
+import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicReference;
 
@@ -30,8 +32,17 @@ import javax.security.auth.Subject;
 import javax.security.auth.login.LoginException;
 
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
+import org.apache.geronimo.gbean.annotation.ParamAttribute;
+import org.apache.geronimo.gbean.annotation.ParamReference;
+import org.apache.geronimo.gbean.annotation.ParamSpecial;
+import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
+import org.apache.geronimo.j2ee.jndi.ApplicationJndi;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.management.EJB;
+import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
+import org.apache.geronimo.security.SecurityNames;
 import org.apache.geronimo.security.jacc.RunAsSource;
+import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.openejb.BeanType;
 import org.apache.openejb.Container;
 import org.apache.openejb.InterfaceType;
@@ -67,32 +78,29 @@ public class EjbDeployment implements EJ
 
     protected AtomicReference<CoreDeploymentInfo> deploymentInfo = new AtomicReference<CoreDeploymentInfo>();
 
-//    private Context javaCompSubContext;
-
-    public EjbDeployment() throws LoginException {
-        this(null, null, null, null, null, null, null, null, null, null,
-             false, null, null, null, null, null, null, null, null);
-    }
-
-    public EjbDeployment(String objectName,
-            String deploymentId,
-            String ejbName,
-            String homeInterfaceName,
-            String remoteInterfaceName,
-            String localHomeInterfaceName,
-            String localInterfaceName,
-            String serviceEndpointInterfaceName,
-            String beanClassName,
-            ClassLoader classLoader,
-            boolean securityEnabled,
-            String defaultRole,
-            String runAsRole,
-            RunAsSource runAsSource,
-            Context componentContext,
-            Set<String> unshareableResources,
-            Set<String> applicationManagedSecurityResources,
-            TrackedConnectionAssociator trackedConnectionAssociator,
-            OpenEjbSystem openEjbSystem) throws LoginException {
+    public EjbDeployment(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
+                         @ParamAttribute(name = "deploymentId") String deploymentId,
+                         @ParamAttribute(name = "ejbName") String ejbName,
+                         @ParamAttribute(name = "homeInterfaceName") String homeInterfaceName,
+                         @ParamAttribute(name = "remoteInterfaceName") String remoteInterfaceName,
+                         @ParamAttribute(name = "localHomeInterfaceName") String localHomeInterfaceName,
+                         @ParamAttribute(name = "localInterfaceName") String localInterfaceName,
+                         @ParamAttribute(name = "serviceEndpointInterfaceName") String serviceEndpointInterfaceName,
+                         @ParamAttribute(name = "beanClassName") String beanClassName,
+                         @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader
classLoader,
+                         @ParamAttribute(name = "securityEnabled") boolean securityEnabled,
+                         @ParamAttribute(name = "defaultRole") String defaultRole,
+                         @ParamAttribute(name = "runAsRole") String runAsRole,
+                         @ParamReference(name = "RunAsSource", namingType = SecurityNames.JACC_MANAGER)
RunAsSource runAsSource,
+                         @ParamReference(name = "ApplicationJndi", namingType = "GBEAN")
ApplicationJndi applicationJndi,
+                         @ParamAttribute(name = "moduleContextMap") Map<String, Object>
moduleJndi,
+                         @ParamAttribute(name = "componentContextMap") Map<String, Object>
compContext,
+                         @ParamAttribute(name = "unshareableResources") Set<String>
unshareableResources,
+                         @ParamAttribute(name = "applicationManagedSecurityResources") Set<String>
applicationManagedSecurityResources,
+                         @ParamReference(name = "TrackedConnectionAssociator") TrackedConnectionAssociator
trackedConnectionAssociator,
+                         @ParamReference(name = "TransactionManager") GeronimoTransactionManager
transactionManager,
+                         @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
+                         @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel)
throws LoginException, NamingException {
         this.objectName = objectName;
         this.deploymentId = deploymentId;
         this.ejbName = ejbName;
@@ -107,15 +115,26 @@ public class EjbDeployment implements EJ
         if (runAsSource == null) {
             runAsSource = RunAsSource.NULL;
         }
-        this.defaultSubject = defaultRole == null? runAsSource.getDefaultSubject(): runAsSource.getSubjectForRole(defaultRole);
+        this.defaultSubject = defaultRole == null ? runAsSource.getDefaultSubject() : runAsSource.getSubjectForRole(defaultRole);
         this.runAs = runAsSource.getSubjectForRole(runAsRole);
-        this.componentContext = componentContext;
+        this.componentContext = buildJndiContext(applicationJndi, moduleJndi, compContext,
transactionManager, kernel, classLoader);
         this.unshareableResources = unshareableResources;
         this.applicationManagedSecurityResources = applicationManagedSecurityResources;
         this.trackedConnectionAssociator = trackedConnectionAssociator;
         this.openEjbSystem = openEjbSystem;
     }
 
+    private static Context buildJndiContext(ApplicationJndi applicationJndi, Map<String,
Object> moduleJndi, Map<String, Object> componentContext, GeronimoTransactionManager
transactionManager, Kernel kernel, ClassLoader classLoader) throws NamingException {
+        Context moduleContext = EnterpriseNamingContext.livenReferences(moduleJndi, transactionManager,
kernel, classLoader, "comp/");
+        Context compContext = EnterpriseNamingContext.livenReferences(componentContext, transactionManager,
kernel, classLoader, "comp/");
+        Set<Context> contexts = new LinkedHashSet<Context>(4);
+        contexts.add(compContext);
+        contexts.add(moduleContext);
+        contexts.add(applicationJndi.getApplicationContext());
+        contexts.add(applicationJndi.getGlobalContext());
+        return EnterpriseNamingContext.createEnterpriseNamingContext(contexts);
+    }
+
     public CoreDeploymentInfo getDeploymentInfo() {
         return deploymentInfo.get();
     }
@@ -253,9 +272,9 @@ public class EjbDeployment implements EJ
     }
 
     public TransactionType getTransactionType(Method method) {
-          return getDeploymentInfo().getTransactionType(method);
+        return getDeploymentInfo().getTransactionType(method);
     }
-    
+
     public String getObjectName() {
         return objectName;
     }
@@ -278,11 +297,11 @@ public class EjbDeployment implements EJ
 //            if (componentContext != null) {
 //                javaCompSubContext.bind("geronimo", componentContext);
 //            }
-            deploymentInfo.set(EjbDeployment.class, this);
+        deploymentInfo.set(EjbDeployment.class, this);
 
-            this.deploymentInfo.set(deploymentInfo);
+        this.deploymentInfo.set(deploymentInfo);
 
-            return this;
+        return this;
 //        } catch (NamingException e) {
 //            throw new IllegalStateException("Unable to complete EjbDeployment initialization",
e);
 //        }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
Wed May 19 23:25:04 2010
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.Map;
 
 import javax.management.ObjectName;
-import javax.naming.Context;
 import javax.naming.NamingException;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.gbean.ReferenceCollection;
@@ -36,7 +35,6 @@ import org.apache.geronimo.gbean.annotat
 import org.apache.geronimo.gbean.annotation.ParamSpecial;
 import org.apache.geronimo.gbean.annotation.SpecialAttributeType;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.j2ee.jndi.ApplicationJndi;
 import org.apache.geronimo.j2ee.management.impl.InvalidObjectNameException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.ObjectNameUtil;
@@ -44,12 +42,11 @@ import org.apache.geronimo.management.EJ
 import org.apache.geronimo.management.EJBModule;
 import org.apache.geronimo.management.J2EEApplication;
 import org.apache.geronimo.management.J2EEServer;
-import org.apache.geronimo.naming.enc.EnterpriseNamingContext;
+import org.apache.openejb.DeploymentInfo;
 import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.UndeployException;
-import org.apache.openejb.DeploymentInfo;
-import org.apache.openejb.core.CoreDeploymentInfo;
 import org.apache.openejb.assembler.classic.EjbJarInfo;
+import org.apache.openejb.core.CoreDeploymentInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,8 +59,6 @@ public class EjbModuleImpl implements EJ
     private static final Logger log = LoggerFactory.getLogger(EjbModuleImpl.class);
     private final J2EEServer server;
     private final J2EEApplication application;
-    private final ApplicationJndi applicationJndi;
-    private final Context moduleContext;
     private final String deploymentDescriptor;
     private final String objectName;
     private final Map<String, EjbDeployment> ejbs = new HashMap<String, EjbDeployment>();
@@ -73,24 +68,20 @@ public class EjbModuleImpl implements EJ
     private final EjbJarInfo ejbJarInfo;
 
     public EjbModuleImpl(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
-                              @ParamReference(name = "J2EEServer", namingType = NameFactory.J2EE_SERVER)
J2EEServer server,
-                              @ParamReference(name = "J2EEApplication", namingType = NameFactory.J2EE_APPLICATION)
J2EEApplication application,
-                              @ParamReference(name = "ApplicationJndi", namingType = "GBEAN")
ApplicationJndi applicationJndi,
-                              @ParamAttribute(name = "moduleJndi") Map<String, Object>
moduleJndi,
-                              @ParamAttribute(name = "deploymentDescriptor") String deploymentDescriptor,
-                              @ParamReference(name = "EJBCollection") Collection<? extends
EjbDeployment> ejbs,
-                              @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader
classLoader,
-                              @ParamSpecial(type = SpecialAttributeType.kernel)Kernel kernel,
-                              @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
-                              @ParamAttribute(name = "ejbJarInfo") EjbJarInfo ejbJarInfo)
throws NamingException {
+                         @ParamReference(name = "J2EEServer", namingType = NameFactory.J2EE_SERVER)
J2EEServer server,
+                         @ParamReference(name = "J2EEApplication", namingType = NameFactory.J2EE_APPLICATION)
J2EEApplication application,
+                         @ParamAttribute(name = "deploymentDescriptor") String deploymentDescriptor,
+                         @ParamReference(name = "EJBCollection") Collection<? extends
EjbDeployment> ejbs,
+                         @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader
classLoader,
+                         @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel,
+                         @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
+                         @ParamAttribute(name = "ejbJarInfo") EjbJarInfo ejbJarInfo) throws
NamingException {
         this.objectName = objectName;
         ObjectName myObjectName = ObjectNameUtil.getObjectName(objectName);
         verifyObjectName(myObjectName);
 
         this.server = server;
         this.application = application;
-        this.applicationJndi = applicationJndi;
-        this.moduleContext = EnterpriseNamingContext.livenReferences(moduleJndi, null, kernel,
classLoader, "module/");
         this.deploymentDescriptor = deploymentDescriptor;
         ((ReferenceCollection) ejbs).addReferenceCollectionListener(new ReferenceCollectionListener()
{
 
@@ -176,14 +167,6 @@ public class EjbModuleImpl implements EJ
         return result;
     }
 
-    public ApplicationJndi getApplicationJndi() {
-        return applicationJndi;
-    }
-
-    public Context getModuleContext() {
-        return moduleContext;
-    }
-
     public void doStart() throws Exception {
         openEjbSystem.createEjbJar(ejbJarInfo, classLoader);
         for (String deploymentId: ejbs.keySet()) {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EntityDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EntityDeploymentGBean.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EntityDeploymentGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EntityDeploymentGBean.java
Wed May 19 23:25:04 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
@@ -28,9 +29,9 @@ public class EntityDeploymentGBean {
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeploymentGBean.class,
-                EjbDeploymentGBean.class,
-                EjbDeploymentGBean.GBEAN_INFO,
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
+                EjbDeployment.class,
+                new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
                 NameFactory.ENTITY_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/MessageDrivenDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/MessageDrivenDeploymentGBean.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/MessageDrivenDeploymentGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/MessageDrivenDeploymentGBean.java
Wed May 19 23:25:04 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
@@ -28,9 +29,9 @@ public class MessageDrivenDeploymentGBea
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeploymentGBean.class,
-                EjbDeploymentGBean.class,
-                EjbDeploymentGBean.GBEAN_INFO,
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
+                EjbDeployment.class,
+                new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
                 NameFactory.MESSAGE_DRIVEN_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java
Wed May 19 23:25:04 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
@@ -28,9 +29,9 @@ public class SingletonDeploymentGBean {
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeploymentGBean.class,
-                EjbDeploymentGBean.class,
-                EjbDeploymentGBean.GBEAN_INFO,
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
+                EjbDeployment.class,
+                new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
                 NameFactory.SINGLETON_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatefulDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatefulDeploymentGBean.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatefulDeploymentGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatefulDeploymentGBean.java
Wed May 19 23:25:04 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
@@ -28,9 +29,9 @@ public class StatefulDeploymentGBean {
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeploymentGBean.class,
-                EjbDeploymentGBean.class,
-                EjbDeploymentGBean.GBEAN_INFO,
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
+                EjbDeployment.class,
+                new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
                 NameFactory.STATEFUL_SESSION_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessDeploymentGBean.java?rev=946478&r1=946477&r2=946478&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessDeploymentGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessDeploymentGBean.java
Wed May 19 23:25:04 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
@@ -28,9 +29,9 @@ public class StatelessDeploymentGBean {
     public static final GBeanInfo GBEAN_INFO;
 
     static {
-        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeploymentGBean.class,
-                EjbDeploymentGBean.class,
-                EjbDeploymentGBean.GBEAN_INFO,
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
+                EjbDeployment.class,
+                new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
                 NameFactory.STATELESS_SESSION_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }



Mime
View raw message