geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r639701 - in /geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb: OBCORBA/ORB_impl.java OCI/iiop.java
Date Fri, 21 Mar 2008 16:31:16 GMT
Author: rickmcguire
Date: Fri Mar 21 09:31:10 2008
New Revision: 639701

URL: http://svn.apache.org/viewvc?rev=639701&view=rev
Log:
YOKO-422 Yoko should support some of the portable ORB.init() properties.


Modified:
    geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java
    geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java

Modified: geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java?rev=639701&r1=639700&r2=639701&view=diff
==============================================================================
--- geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java (original)
+++ geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OBCORBA/ORB_impl.java Fri Mar
21 09:31:10 2008
@@ -1648,24 +1648,28 @@
         //
         // Load the contents of the configuration file if present
         //
-        if (configFile != null && configFile.length() > 0)
+        if (configFile != null && configFile.length() > 0) {
             loadConfigFile(configFile, properties, logger);
+        }
 
         //
         // Set the default value of the ORB and OA concurrency models if
         // they are not already set
         //
-        if (properties.getProperty("yoko.orb.conc_model") == null)
+        if (properties.getProperty("yoko.orb.conc_model") == null) {
             properties.put("yoko.orb.conc_model", "threaded");
+        }
 
-        if (properties.getProperty("yoko.orb.oa.conc_model") == null)
+        if (properties.getProperty("yoko.orb.oa.conc_model") == null) {
             properties.put("yoko.orb.oa.conc_model", "thread_per_client");
+        }
 
         //
         // set the default number of AMI workers if not already set
         //
-        if (properties.getProperty("yoko.orb.ami_workers") == null)
+        if (properties.getProperty("yoko.orb.ami_workers") == null) {
             properties.put("yoko.orb.ami_workers", "1");
+        }
 
         //
         // Process each argument. Turn each argument into an appropriate

Modified: geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java
URL: http://svn.apache.org/viewvc/geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java?rev=639701&r1=639700&r2=639701&view=diff
==============================================================================
--- geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java (original)
+++ geronimo/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java Fri Mar 21 09:31:10
2008
@@ -85,22 +85,45 @@
             java.util.Enumeration keys = props.keys();
             while (keys.hasMoreElements()) {
                 String key = (String) keys.nextElement();
-                if (!key.startsWith("yoko.iiop."))
-                    continue;
-                String value = props.getProperty(key);
+                // we'll recognize and process the some of the 
+                // portable CORBA properties for cross-orb compatibility
+                if (key.startsWith("org.omg.CORBA.")) {
+                    String value = props.getProperty(key);
+                    if (key.equals("org.omg.CORBA.ORBInitialHost")) {
+                        host = value; 
+                        haveArgs = true; 
+                    }
+                    else if (key.equals("org.omg.CORBA.ORBInitialPort")) {
+                        port = value; 
+                        haveArgs = true; 
+                    }
+                    else if (key.equals("org.omg.CORBA.ORBListenEndpoints")) {
+                        // both specified on one property 
+                        int sep = value.indexOf(':'); 
+                        if (sep != -1) {
+                            host = value.substring(0, sep); 
+                            port = value.substring(sep + 1); 
+                            haveArgs = true; 
+                        }
+                    }
+                }
+                else if (key.startsWith("yoko.iiop.")) {
+                    String value = props.getProperty(key);
 
-                if (key.equals("yoko.iiop.host")) {
-                    host = value;
-                    haveArgs = true;
-                } else if (key.equals("yoko.iiop.numeric")) {
-                    numeric = true;
-                    haveArgs = true;
-                } else if (key.equals("yoko.iiop.port")) {
-                    port = value;
-                    haveArgs = true;
-                } else
-                    throw new org.omg.CORBA.INITIALIZE("iiop: unknown "
-                            + "property " + key);
+                    if (key.equals("yoko.iiop.host")) {
+                        host = value;
+                        haveArgs = true;
+                    } else if (key.equals("yoko.iiop.numeric")) {
+                        numeric = true;
+                        haveArgs = true;
+                    } else if (key.equals("yoko.iiop.port")) {
+                        port = value;
+                        haveArgs = true;
+                    } else {
+                        throw new org.omg.CORBA.INITIALIZE("iiop: unknown "
+                                + "property " + key);
+                    }
+                }
             }
         }
 



Mime
View raw message