geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1101797 - /geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java
Date Wed, 11 May 2011 09:25:28 GMT
Author: genspring
Date: Wed May 11 09:25:28 2011
New Revision: 1101797

URL: http://svn.apache.org/viewvc?rev=1101797&view=rev
Log:
GERONIMO-5945 GBean startup NPE when en EJB module includes two EJB associated with the same
IOR object

Modified:
    geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java

Modified: geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java?rev=1101797&r1=1101796&r2=1101797&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java
(original)
+++ geronimo/server/trunk/plugins/corba/geronimo-corba/src/main/java/org/apache/geronimo/corba/AdapterWrapper.java
Wed May 11 09:25:28 2011
@@ -28,7 +28,7 @@ import org.apache.openejb.ContainerType;
  * @version $Revision: 477657 $ $Date: 2006-11-21 04:54:49 -0800 (Tue, 21 Nov 2006) $
  */
 public final class AdapterWrapper {
-    private final static Map adapters = new HashMap();
+    private final static Map<String,Adapter> adapters = new HashMap<String,Adapter>();
     private final TSSLink tssLink;
     private Adapter generator;
 
@@ -38,6 +38,13 @@ public final class AdapterWrapper {
     }
 
     public void start(ORB orb, POA poa, Policy securityPolicy) throws CORBAException {
+        
+        if (tssLink.getDeployment() == null || tssLink.getDeployment().getDeploymentInfo()
== null) {
+            
+            throw new CORBAException("tssLink's ejb deployment info is not ready");
+
+        }
+        
         ContainerType containerType = tssLink.getDeployment().getContainer().getContainerType();
         switch (containerType) {
             case STATELESS:
@@ -57,7 +64,10 @@ public final class AdapterWrapper {
     }
 
     public void stop() throws CORBAException {
-        generator.stop();
+        
+        if (generator != null) {
+            generator.stop();
+        }
         adapters.remove(tssLink.getContainerId());
     }
 



Mime
View raw message