geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r498010 - in /geronimo/server/trunk/modules: geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ geronimo-openejb/src/main/java/org/apache/geronimo/openejb/
Date Fri, 19 Jan 2007 23:51:57 GMT
Author: dain
Date: Fri Jan 19 15:51:56 2007
New Revision: 498010

URL: http://svn.apache.org/viewvc?view=rev&rev=498010
Log:
Resource refs work in EJBs but persistence ref, some ejb refs, and UserTransaction refs don't

Modified:
    geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?view=diff&rev=498010&r1=498009&r2=498010
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Fri Jan 19 15:51:56 2007
@@ -85,7 +85,7 @@
  */
 public class EjbModuleBuilder implements ModuleBuilder {
     private static final String OPENEJBJAR_NAMESPACE = XmlUtil.OPENEJBJAR_QNAME.getNamespaceURI();
-    private static final String MAPPED_NAME_PREFIX = "jndi:java:/comp/geronimo/";
+    private static final String MAPPED_NAME_PREFIX = "jndi:java:comp/geronimo/env/";
 
     private final Environment defaultEnvironment;
     private final Collection webServiceBuilders;
@@ -248,7 +248,7 @@
 
     protected static void unmapReferences(EjbJar ejbJar) {
         for (EnterpriseBean enterpriseBean : ejbJar.getEnterpriseBeans()) {
-            enterpriseBean.getEjbRef().clear();
+            enterpriseBean.getEnvEntry().clear();
             for (EjbRef ref : enterpriseBean.getEjbRef()) {
                 ref.setMappedName(null);
                 ref.getInjectionTarget().clear();

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java?view=diff&rev=498010&r1=498009&r2=498010
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeployment.java
Fri Jan 19 15:51:56 2007
@@ -20,11 +20,11 @@
 import java.util.Set;
 import javax.ejb.EJBHome;
 import javax.ejb.EJBLocalHome;
-import javax.security.auth.Subject;
 import javax.naming.Context;
+import javax.security.auth.Subject;
 
-import org.apache.geronimo.management.EJB;
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
+import org.apache.geronimo.management.EJB;
 import org.apache.openejb.core.CoreDeploymentInfo;
 
 public class EjbDeployment implements EJB {
@@ -180,7 +180,9 @@
         if (deploymentInfo == null) {
             throw new IllegalStateException("Ejb does not exist " + deploymentId);
         }
-        deploymentInfo.getJndiEnc().bind("geronimo", componentContext);
+        if (componentContext != null) {
+            ((Context)deploymentInfo.getJndiEnc().lookup("java:comp")).bind("geronimo", componentContext);
+        }
         deploymentInfo.set(EjbDeployment.class, this);
     }
 

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java?view=diff&rev=498010&r1=498009&r2=498010
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbDeploymentGBean.java
Fri Jan 19 15:51:56 2007
@@ -31,6 +31,7 @@
 import org.apache.geronimo.security.util.ConfigurationUtil;
 import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
+import org.apache.geronimo.kernel.Kernel;
 
 public class EjbDeploymentGBean extends EjbDeployment implements GBeanLifecycle {
     public EjbDeploymentGBean(String objectName,
@@ -50,7 +51,8 @@
             Set applicationManagedSecurityResources,
             TrackedConnectionAssociator trackedConnectionAssociator,
             GeronimoTransactionManager transactionManager,
-            OpenEjbSystem openEjbSystem) throws Exception {
+            OpenEjbSystem openEjbSystem,
+            Kernel kernel) throws Exception {
         super(objectName,
                 deploymentId,
                 ejbName,
@@ -63,7 +65,7 @@
                 classLoader,
                 generateDefaultSubject(defaultPrincipal, classLoader),
                 runAs,
-                EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, transactionManager,
null, classLoader),
+                EnterpriseNamingContext.createEnterpriseNamingContext(componentContext, transactionManager,
kernel, classLoader),
                 unshareableResources,
                 applicationManagedSecurityResources,
                 trackedConnectionAssociator,
@@ -120,6 +122,8 @@
 
         infoFactory.addReference("OpenEjbSystem", OpenEjbSystem.class);
 
+        infoFactory.addAttribute("kernel", Kernel.class, false);
+
         infoFactory.setConstructor(new String[]{
                 "objectName",
                 "deploymentId",
@@ -144,6 +148,8 @@
                 "TransactionManager",
 
                 "OpenEjbSystem",
+
+                "kernel",
         });
 
         GBEAN_INFO = infoFactory.getBeanInfo();



Mime
View raw message