geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1023630 - in /geronimo/server/trunk/plugins/openejb: geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java openejb/pom.xml openejb/src/main/plan/plan.xml
Date Mon, 18 Oct 2010 02:28:28 GMT
Author: genspring
Date: Mon Oct 18 02:28:27 2010
New Revision: 1023630

URL: http://svn.apache.org/viewvc?rev=1023630&view=rev
Log:
GERONIMO-5353 To support idleTimeout configuration for stateless ejb conainter.

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java
    geronimo/server/trunk/plugins/openejb/openejb/pom.xml
    geronimo/server/trunk/plugins/openejb/openejb/src/main/plan/plan.xml

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java?rev=1023630&r1=1023629&r2=1023630&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/StatelessContainerGBean.java
Mon Oct 18 02:28:27 2010
@@ -38,14 +38,36 @@ public class StatelessContainerGBean ext
      * result in a time-out of 5 milliseconds between invocations.
      * A value of zero would mean no timeout.
      */
-    private final int timeout;
+    private final int accessTimeout;
+    
+    /**
+     * PostConstruct methods are invoked on all instances in the pool
+     * when the bean is undeployed and its pool is closed.  The
+     * CloseTimeout specifies the maximum time to wait for the pool to
+     *  close and PostConstruct methods to be invoked.
+     */
+    private int closeTimeout;
 
     /**
      * Specifies the size of the bean pools for this
      * stateless SessionBean container.
      */
 
-    private final int poolSize;
+    private final int maxSize;
+    
+    
+    /** Specifies the minimum number of bean instances that should be
+     * in this stateless SessionBean container  
+     */
+     private int minSize;
+     
+     
+	/**
+	 * Specifies the maximum time that an instance should be allowed to sit idly
+	 * in the pool without use before it should be retired and removed.
+	 */
+      private int idleTimeout;
+     
 
     /**
      * StrictPooling tells the container what to do when the pool
@@ -67,28 +89,49 @@ public class StatelessContainerGBean ext
             @ParamSpecial(type = SpecialAttributeType.abstractName) AbstractName abstractName,
             @ParamReference(name = "OpenEjbSystem") OpenEjbSystem openEjbSystem,
             @ParamAttribute(name = "provider") String provider,
-            @ParamAttribute(name = "poolSize") int poolSize,
+            @ParamAttribute(name = "maxSize") int maxSize,
+            @ParamAttribute(name = "minSize") int minSize,
             @ParamAttribute(name = "strictPooling") boolean strictPooling,
-            @ParamAttribute(name = "timeout") int timeout,
+            @ParamAttribute(name = "accessTimeout") int accessTimeout,
+            @ParamAttribute(name = "closeTimeout") int closeTimeout,
+            @ParamAttribute(name = "idleTimeout") int idleTimeout,            
             @ParamAttribute(name = "properties") Properties properties) {
         super(abstractName, StatelessSessionContainerInfo.class, openEjbSystem, provider,
"STATELESS", properties);
-        set("PoolSize", Integer.toString(poolSize));
+        set("MaxSize", Integer.toString(maxSize));
+        set("MinSize", Integer.toString(minSize));        
         set("StrictPooling", Boolean.toString(strictPooling));
-        set("TimeOut", Integer.toString(timeout));
-        this.poolSize = poolSize;
+        set("AccessTimeout", Integer.toString(accessTimeout));
+        set("CloseTimeout", Integer.toString(closeTimeout));
+        set("IdleTimeout", Integer.toString(idleTimeout));
+        this.maxSize = maxSize;
+        this.minSize= minSize;
         this.strictPooling = strictPooling;
-        this.timeout = timeout;
+        this.accessTimeout = accessTimeout;
+        this.closeTimeout=closeTimeout;
+        this.idleTimeout=idleTimeout;        
     }
 
     public int getPoolSize() {
-        return poolSize;
+        return maxSize;
     }
 
     public boolean isStrictPooling() {
         return strictPooling;
     }
 
-    public int getTimeout() {
-        return timeout;
+    public int getAccessTimeout() {
+        return accessTimeout;
+    }
+
+    public int getCloseTimeout() {
+        return closeTimeout;
+    }
+    
+    public int getIdleTimeout() {
+        return idleTimeout;
+    }    
+
+    public int getPoolMin() {
+        return minSize;
     }
 }

Modified: geronimo/server/trunk/plugins/openejb/openejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/pom.xml?rev=1023630&r1=1023629&r2=1023630&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/pom.xml (original)
+++ geronimo/server/trunk/plugins/openejb/openejb/pom.xml Mon Oct 18 02:28:27 2010
@@ -163,11 +163,11 @@
                                 </gbean>
                                 <gbean name="DefaultStatefulContainer">
                                     <attribute name="timeout">${StatefulTimeout}</attribute>
-                                    <attribute name="capacity">${Capacity}</attribute>
-                                    <attribute name="bulkPassivate">${BulkPassivate}</attribute>
+                                    <attribute name="capacity">${StatefulCapacity}</attribute>
+                                    <attribute name="bulkPassivate">${StatefulBulkPassivate}</attribute>
                                 </gbean>
                                 <gbean name="DefaultSingletonContainer">
-                                    <attribute name="accessTimeout">${AccessTimeout}</attribute>
+                                    <attribute name="accessTimeout">${SingletonAccessTimeout}</attribute>
                                 </gbean>
                                 <gbean name="DefaultBMPContainer">
                                     <attribute name="poolSize">${BMPPoolSize}</attribute>
@@ -175,18 +175,20 @@
                                 <gbean name="DefaultStatelessContainer">
                                     <attribute name="timeout">${StatelessTimeout}</attribute>
                                     <attribute name="poolSize">${StatelessPoolSize}</attribute>
-                                    <attribute name="strictPooling">${StrictPooling}</attribute>
+                                    <attribute name="strictPooling">${StatelessStrictPooling}</attribute>
+                                    <attribute name="idleTimeout">${StatelessIdleTimeout}</attribute>
                                     
                                 </gbean>
                             </config-xml-content>
                             <config-substitution key="OpenEJBPort">4201</config-substitution>
                             <config-substitution key="StatefulTimeout">20</config-substitution>
-                            <config-substitution key="Capacity">1000</config-substitution>
-                            <config-substitution key="BulkPassivate">100</config-substitution>
-                            <config-substitution key="AccessTimeout">30</config-substitution>
+                            <config-substitution key="StatefulCapacity">1000</config-substitution>
+                            <config-substitution key="StatefulBulkPassivate">100</config-substitution>
+                            <config-substitution key="SingletonAccessTimeout">30</config-substitution>
                             <config-substitution key="BMPPoolSize">10</config-substitution>
                             <config-substitution key="StatelessTimeout">0</config-substitution>
                             <config-substitution key="StatelessPoolSize">10</config-substitution>
-                            <config-substitution key="StrictPooling">true</config-substitution>
+                            <config-substitution key="StatelessStrictPooling">true</config-substitution>
+                            <config-substitution key="StatelessIdleTimeout">0</config-substitution>
                              
                             <config-substitution key="MulticastDiscoveryAddress">239.255.3.2</config-substitution>
                             <config-substitution key="MulticastDiscoveryPort">6142</config-substitution>
                             <config-substitution key="ClusterName">cluster1</config-substitution>

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=1023630&r1=1023629&r2=1023630&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 Mon Oct 18 02:28:27
2010
@@ -42,9 +42,12 @@
     </gbean>
 
     <gbean name="DefaultStatelessContainer" class="org.apache.geronimo.openejb.StatelessContainerGBean">
-        <attribute name="timeout">0</attribute>
-        <attribute name="poolSize">10</attribute>
+        <attribute name="accessTimeout">0</attribute>
+        <attribute name="closeTimeout">300000</attribute>          
+        <attribute name="maxSize">10</attribute>
+        <attribute name="minSize">0</attribute>
         <attribute name="strictPooling">true</attribute>
+        <attribute name="idleTimeout">0</attribute>         
         <reference name="OpenEjbSystem">
             <name>OpenEjbSystem</name>
         </reference>



Mime
View raw message