geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r634809 - in /geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb: OB/InitialServiceManager.java OBPortableInterceptor/ORBInitInfo_impl.java
Date Fri, 07 Mar 2008 20:37:09 GMT
Author: rickmcguire
Date: Fri Mar  7 12:37:08 2008
New Revision: 634809

URL: http://svn.apache.org/viewvc?rev=634809&view=rev
Log:
YOKO-419 RootPOA not available to resolve_initial_reference() call in ORB initializer.


Modified:
    geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/InitialServiceManager.java
    geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java

Modified: geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/InitialServiceManager.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/InitialServiceManager.java?rev=634809&r1=634808&r2=634809&view=diff
==============================================================================
--- geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/InitialServiceManager.java
(original)
+++ geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/InitialServiceManager.java
Fri Mar  7 12:37:08 2008
@@ -17,7 +17,14 @@
 
 package org.apache.yoko.orb.OB;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.omg.CORBA.LocalObject;
+
 public final class InitialServiceManager {
+    static final Logger logger = Logger.getLogger(InitialServiceManager.class.getName());
+    
     //
     // Set of available initial services
     //
@@ -141,6 +148,8 @@
                     org.omg.CORBA.CompletionStatus.COMPLETED_NO);
 
         Assert._OB_assert(identifier != null);
+        
+        logger.fine("Resolving initial ORB reference for " + identifier); 
 
         ObjectFactory objectFactory = orbInstance_.getObjectFactory();
 
@@ -159,6 +168,8 @@
                 services_.put(identifier, svc);
             }
         }
+        
+        logger.fine("No match found for ORB intial reference " + identifier); 
 
         //
         // If no match was found, and there's a default initial
@@ -173,14 +184,17 @@
             obj = objectFactory.stringToObject(url);
         }
 
-        if (obj == null)
+        if (obj == null) {
+            logger.fine("No default initializer found for ORB intial reference " + identifier);

             throw new org.omg.CORBA.ORBPackage.InvalidName();
+        }
 
         //
         // If the object is a l-c object, return the object now
         //
-        if (obj instanceof org.omg.CORBA.LocalObject)
+        if (obj instanceof org.omg.CORBA.LocalObject) {
             return obj;
+        }
 
         //
         // If the object is remote, return a new reference with the
@@ -215,20 +229,26 @@
 
     public synchronized void addInitialReference(String name, String iorString,
             boolean override) throws org.omg.CORBA.ORBPackage.InvalidName {
+        logger.fine("Adding initial reference name=" + name + ", ior=" + iorString); 
         //
         // The ORB destroys this object, so it's an initialization error
         // if this operation is called after ORB destruction
         //
         if (destroy_)
+        {
             throw new org.omg.CORBA.INITIALIZE(org.apache.yoko.orb.OB.MinorCodes
-                    .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed),
-                    org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed,
-                    org.omg.CORBA.CompletionStatus.COMPLETED_NO);
+                                               .describeInitialize(org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed),
+                                               org.apache.yoko.orb.OB.MinorCodes.MinorORBDestroyed,
+                                               org.omg.CORBA.CompletionStatus.COMPLETED_NO);
+        }
 
         Assert._OB_assert(name != null && iorString != null);
 
         if (services_.containsKey(name) && !override)
+        {
+            logger.fine("Initial reference name=" + name + "already exists"); 
             throw new org.omg.CORBA.ORBPackage.InvalidName();
+        }
 
         Service svc = new Service();
         svc.ref = iorString;
@@ -238,6 +258,12 @@
     public synchronized void addInitialReference(String name,
             org.omg.CORBA.Object p, boolean override)
             throws org.omg.CORBA.ORBPackage.InvalidName {
+        if (p != null) {
+            logger.fine("Adding initial reference name=" + name + " of type " + p.getClass().getName());

+        }
+        else {
+            logger.fine("Adding initial reference name=" + name + " with null implementation");

+        }
         //
         // The ORB destroys this object, so it's an initialization error
         // if this operation is called after ORB destruction

Modified: geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java?rev=634809&r1=634808&r2=634809&view=diff
==============================================================================
--- geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java
(original)
+++ geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBPortableInterceptor/ORBInitInfo_impl.java
Fri Mar  7 12:37:08 2008
@@ -124,7 +124,10 @@
 
         // TODO: check state
         try {
-            return initServiceManager_.resolveInitialReferences(name);
+            // we delegate this to the ORB rather than call the initial service manager directly.

+            // because the ORB has a special test to initialize the RootPOA service if it

+            // doesn't exist. 
+            return orb_.resolve_initial_references(name);
         } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
             throw (org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName)new 
                 org.omg.PortableInterceptor.ORBInitInfoPackage.InvalidName().initCause(ex);




Mime
View raw message