geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r958328 - in /geronimo/server/trunk/plugins: j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/ openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ openejb/geronimo-openejb/src/main...
Date Sun, 27 Jun 2010 06:05:46 GMT
Author: djencks
Date: Sun Jun 27 06:05:45 2010
New Revision: 958328

URL: http://svn.apache.org/viewvc?rev=958328&view=rev
Log:
support managed ejbs

Added:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedContainerGBean.java
      - copied, changed from r957674, geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonContainerGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedDeploymentGBean.java
      - copied, changed from r957674, geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java
Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/BasicEjbDeploymentGBeanNameBuilder.java
    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/src/main/java/org/apache/geronimo/openejb/EjbContainer.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GenericContainerGBean.java
    geronimo/server/trunk/plugins/openejb/openejb/src/main/history/dependencies.xml
    geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
Sun Jun 27 06:05:45 2010
@@ -47,6 +47,7 @@ public class NameFactory {
     public static final String STATELESS_SESSION_BEAN = "StatelessSessionBean";
     public static final String MESSAGE_DRIVEN_BEAN = "MessageDrivenBean";
     public static final String SINGLETON_BEAN = "SingletonBean";
+    public static final String MANAGED_BEAN = "MaangedBean";
     public static final String SERVLET = "Servlet";
     public static final String RESOURCE_ADAPTER = "ResourceAdapter";
     public static final String JAVA_MAIL_RESOURCE = "JavaMailResource";

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/BasicEjbDeploymentGBeanNameBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/BasicEjbDeploymentGBeanNameBuilder.java?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/BasicEjbDeploymentGBeanNameBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/BasicEjbDeploymentGBeanNameBuilder.java
Sun Jun 27 06:05:45 2010
@@ -24,6 +24,7 @@ import org.apache.geronimo.j2ee.deployme
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.openejb.jee.EnterpriseBean;
 import org.apache.openejb.jee.EntityBean;
+import org.apache.openejb.jee.ManagedBean;
 import org.apache.openejb.jee.MessageDrivenBean;
 import org.apache.openejb.jee.SessionBean;
 import org.apache.openejb.jee.SingletonBean;
@@ -49,6 +50,9 @@ public class BasicEjbDeploymentGBeanName
                 case SINGLETON:
                     type = NameFactory.SINGLETON_BEAN;
                     break;
+                case MANAGED:
+                    type = NameFactory.MANAGED_BEAN;
+                    break;
             }
         } else if (enterpriseBean instanceof EntityBean) {
             type = NameFactory.ENTITY_BEAN;

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=958328&r1=958327&r2=958328&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
Sun Jun 27 06:05:45 2010
@@ -46,6 +46,7 @@ import org.apache.geronimo.naming.deploy
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
 import org.apache.geronimo.openejb.EntityDeploymentGBean;
+import org.apache.geronimo.openejb.ManagedDeploymentGBean;
 import org.apache.geronimo.openejb.MessageDrivenDeploymentGBean;
 import org.apache.geronimo.openejb.OpenEjbSystem;
 import org.apache.geronimo.openejb.SingletonDeploymentGBean;
@@ -108,6 +109,9 @@ public class EjbDeploymentBuilder {
                     case SINGLETON:
                         gbean = new GBeanData(abstractName, SingletonDeploymentGBean.GBEAN_INFO);
                         break;
+                    case MANAGED:
+                        gbean = new GBeanData(abstractName, ManagedDeploymentGBean.GBEAN_INFO);
+                        break;
                 }
             } else if (enterpriseBean instanceof EntityBean) {
                 gbean = new GBeanData(abstractName, EntityDeploymentGBean.GBEAN_INFO);

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbContainer.java?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbContainer.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbContainer.java
Sun Jun 27 06:05:45 2010
@@ -19,6 +19,7 @@ package org.apache.geronimo.openejb;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.openejb.assembler.classic.ContainerInfo;
+import org.apache.openejb.assembler.classic.ManagedContainerInfo;
 import org.apache.openejb.assembler.classic.StatelessSessionContainerInfo;
 import org.apache.openejb.assembler.classic.StatefulSessionContainerInfo;
 import org.apache.openejb.assembler.classic.BmpEntityContainerInfo;
@@ -99,6 +100,7 @@ public class EjbContainer implements GBe
         if ("CMP_ENTITY".equalsIgnoreCase(type)) return CmpEntityContainerInfo.class;
         if ("CMP2_ENTITY".equalsIgnoreCase(type)) return CmpEntityContainerInfo.class;
         if ("MESSAGE".equalsIgnoreCase(type)) return MdbContainerInfo.class;
+        if ("MANAGED".equalsIgnoreCase(type)) return ManagedContainerInfo.class;
 
         String className = type; // EjbModuleBuilder will pass in the className of the gbean
         if (className.endsWith("StatelessContainerGBean")) return StatelessSessionContainerInfo.class;
@@ -106,6 +108,7 @@ public class EjbContainer implements GBe
         if (className.endsWith("SingletonContainerGBean")) return SingletonSessionContainerInfo.class;
         if (className.endsWith("BmpContainerGBean")) return BmpEntityContainerInfo.class;
         if (className.endsWith("CmpContainerGBean")) return CmpEntityContainerInfo.class;
+        if (className.endsWith("ManagedContainerGBean")) return ManagedContainerInfo.class;
 
         else return ContainerInfo.class;
     }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GenericContainerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GenericContainerGBean.java?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GenericContainerGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/GenericContainerGBean.java
Sun Jun 27 06:05:45 2010
@@ -44,7 +44,9 @@ public class GenericContainerGBean exten
             @ParamAttribute(name = "type") String type,
             @ParamAttribute(name = "properties") Properties properties) {
         super(abstractName, getInfoType(type), openEjbSystem, provider, type, new Properties());
-        getProperties().putAll(properties);
+        if (properties != null) {
+            getProperties().putAll(properties);
+        }
     }
 
 

Copied: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedContainerGBean.java
(from r957674, geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonContainerGBean.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedContainerGBean.java?p2=geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedContainerGBean.java&p1=geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonContainerGBean.java&r1=957674&r2=958328&rev=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonContainerGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedContainerGBean.java
Sun Jun 27 06:05:45 2010
@@ -16,40 +16,31 @@
  */
 package org.apache.geronimo.openejb;
 
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.annotation.GBean;
-import org.apache.geronimo.gbean.annotation.ParamSpecial;
-import org.apache.geronimo.gbean.annotation.ParamReference;
 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.gbean.AbstractName;
-import org.apache.openejb.assembler.classic.SingletonSessionContainerInfo;
+import org.apache.openejb.assembler.classic.ManagedContainerInfo;
 import org.apache.openejb.util.Duration;
 
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
 /**
  * @version $Rev$ $Date$
  */
 @GBean
-public class SingletonContainerGBean extends EjbContainer {
+public class ManagedContainerGBean extends EjbContainer {
 
-    private final long accessTimeout;
 
-    public SingletonContainerGBean(
+    public ManagedContainerGBean(
             @ParamSpecial(type = SpecialAttributeType.abstractName) AbstractName abstractName,
             @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
             @ParamAttribute(name = "provider") String provider,
-            @ParamAttribute(name = "accessTimeout") long accessTimeout,
             @ParamAttribute(name = "properties") Properties properties) {
-        super(abstractName, SingletonSessionContainerInfo.class, openEjbSystem, provider,
"SINGLETON", properties);
-
-        Duration duration = new Duration(accessTimeout, TimeUnit.SECONDS);
-        set("AccessTimeout", duration.toString());
-        this.accessTimeout = accessTimeout;
+        super(abstractName, ManagedContainerInfo.class, openEjbSystem, provider, "MANAGED",
properties);
     }
 
-    public long getAccessTimeout() {
-        return accessTimeout;
-    }
-}
+}
\ No newline at end of file

Copied: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedDeploymentGBean.java
(from r957674, 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/ManagedDeploymentGBean.java?p2=geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ManagedDeploymentGBean.java&p1=geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/SingletonDeploymentGBean.java&r1=957674&r2=958328&rev=958328&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/ManagedDeploymentGBean.java
Sun Jun 27 06:05:45 2010
@@ -25,14 +25,14 @@ import org.apache.geronimo.j2ee.j2eeobje
 /**
  * @version $Rev$ $Date$
  */
-public class SingletonDeploymentGBean {
+public class ManagedDeploymentGBean {
     public static final GBeanInfo GBEAN_INFO;
 
     static {
         GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EjbDeployment.class,
                 EjbDeployment.class,
                 new AnnotationGBeanInfoFactory().getGBeanInfo(EjbDeployment.class),
-                NameFactory.SINGLETON_BEAN);
+                NameFactory.MANAGED_BEAN);
         GBEAN_INFO = infoFactory.getBeanInfo();
     }
 

Modified: geronimo/server/trunk/plugins/openejb/openejb/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/src/main/history/dependencies.xml?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/src/main/history/dependencies.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/src/main/history/dependencies.xml Sun Jun
27 06:05:45 2010
@@ -122,6 +122,11 @@
         <type>jar</type>
     </dependency>
     <dependency>
+        <groupId>org.apache.xbean</groupId>
+        <artifactId>xbean-bundleutils</artifactId>
+        <type>jar</type>
+    </dependency>
+    <dependency>
         <groupId>org.apache.yoko</groupId>
         <artifactId>yoko-spec-corba</artifactId>
         <type>jar</type>

Modified: geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml?rev=958328&r1=958327&r2=958328&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml Sun Jun 27 06:05:45
2010
@@ -74,6 +74,11 @@
             <name>OpenEjbSystem</name>
         </reference>
     </gbean>
+    <gbean name="DefaultManagedContainer" class="org.apache.geronimo.openejb.ManagedContainerGBean">
+        <reference name="OpenEjbSystem">
+            <name>OpenEjbSystem</name>
+        </reference>
+    </gbean>
 
     <gbean name="EJBNetworkService" class="org.apache.geronimo.openejb.EjbDaemonGBean">
         <attribute name="port">${planOpenEJBPort}</attribute>



Mime
View raw message