geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r526051 - /geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Date Fri, 06 Apr 2007 04:40:53 GMT
Author: dblevins
Date: Thu Apr  5 21:40:52 2007
New Revision: 526051

URL: http://svn.apache.org/viewvc?view=rev&rev=526051
Log:
Use proper approach to check if bean is stateless

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

Modified: geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java?view=diff&rev=526051&r1=526050&r2=526051
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbDeploymentBuilder.java
Thu Apr  5 21:40:52 2007
@@ -55,6 +55,7 @@
 import org.apache.openejb.jee.MessageDrivenBean;
 import org.apache.openejb.jee.EntityBean;
 import org.apache.openejb.jee.SessionBean;
+import org.apache.openejb.jee.SessionType;
 import org.apache.openejb.jee.oejb3.EjbDeployment;
 import org.apache.geronimo.openejb.StatelessDeploymentGBean;
 import org.apache.geronimo.openejb.StatefulDeploymentGBean;
@@ -140,8 +141,8 @@
                     gbean.setAttribute(EjbInterface.LOCAL_HOME.getAttributeName(), localHomeInterfaceName);
                 }
 
-                if (enterpriseBean instanceof StatelessBean) {
-                    StatelessBean statelessBean = (StatelessBean) enterpriseBean;
+                if (enterpriseBean instanceof SessionBean && ((SessionBean)enterpriseBean).getSessionType()
== SessionType.STATELESS ) {
+                    SessionBean statelessBean = (SessionBean) enterpriseBean;
                     gbean.setAttribute(EjbInterface.SERVICE_ENDPOINT.getAttributeName(),
statelessBean.getServiceEndpoint());
                 }
             }



Mime
View raw message