geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r523367 - /geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java
Date Wed, 28 Mar 2007 15:28:18 GMT
Author: rickmcguire
Date: Wed Mar 28 08:28:09 2007
New Revision: 523367

URL: http://svn.apache.org/viewvc?view=rev&rev=523367
Log:
GERONIMO-3037 Shutdown exception in CORBA Adapter code.


Modified:
    geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java

Modified: geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java?view=diff&rev=523367&r1=523366&r2=523367
==============================================================================
--- geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java
(original)
+++ geronimo/server/trunk/modules/geronimo-corba/src/main/java/org/apache/geronimo/corba/Adapter.java
Wed Mar 28 08:28:09 2007
@@ -45,8 +45,10 @@
     private final NamingContextExt initialContext;
     private final byte[] home_id;
     private final org.omg.CORBA.Object homeReference;
+    private final TSSLink tssLink; 
 
     protected Adapter(TSSLink tssLink, ORB orb, POA parentPOA, Policy securityPolicy) throws
CORBAException {
+        this.tssLink = tssLink; 
         this.deployment = tssLink.getDeployment();
         this.home_id = tssLink.getContainerId().getBytes();
         this.orb = orb;
@@ -118,17 +120,20 @@
 
     public void stop() throws CORBAException {
         try {
-            NameComponent[] nameComponent = initialContext.to_name(deployment.getDeploymentId());
-            initialContext.unbind(nameComponent);
+            String[] names = tssLink.getJndiNames();
+            for (int i = 0; i < names.length; i++) {
+                NameComponent[] nameComponent = initialContext.to_name(names[i]);
+                initialContext.unbind(nameComponent);
 
-            for (int j = nameComponent.length - 1; 0 < j; --j) {
-                NameComponent[] nc = new NameComponent[j];
-                System.arraycopy(nameComponent, 0, nc, 0, j);
-                NamingContext currentContext = NamingContextHelper.narrow(initialContext.resolve(nc));
-                try {
-                    currentContext.destroy();
-                } catch (NotEmpty ne) {
-                    break;
+                for (int j = nameComponent.length - 1; 0 < j; --j) {
+                    NameComponent[] nc = new NameComponent[j];
+                    System.arraycopy(nameComponent, 0, nc, 0, j);
+                    NamingContext currentContext = NamingContextHelper.narrow(initialContext.resolve(nc));
+                    try {
+                        currentContext.destroy();
+                    } catch (NotEmpty ne) {
+                        break;
+                    }
                 }
             }
 



Mime
View raw message