incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmidd...@apache.org
Subject svn commit: r508068 - /incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java
Date Thu, 15 Feb 2007 18:45:05 GMT
Author: dmiddlem
Date: Thu Feb 15 10:45:04 2007
New Revision: 508068

URL: http://svn.apache.org/viewvc?view=rev&rev=508068
Log:
Fixing the handling of the ORBClass and ORBSingletonClass properties (YOKO-293)

Modified:
    incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java

Modified: incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java?view=diff&rev=508068&r1=508067&r2=508068
==============================================================================
--- incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java (original)
+++ incubator/yoko/trunk/yoko-spec-corba/src/main/java/org/omg/CORBA/ORB.java Thu Feb 15 10:45:04
2007
@@ -20,6 +20,7 @@
 import java.security.AccessController;
 
 public abstract class ORB {
+
     public abstract String[] list_initial_services();
 
     public abstract org.omg.CORBA.Object resolve_initial_references(
@@ -165,15 +166,17 @@
     }
 
     private static ORB ORBSingleton_;
+    private static final String ORBClassPropertyKey = "org.omg.CORBA.ORBClass";
+    private static final String ORBSingletonPropertyKey = "org.omg.CORBA.ORBSingleton";
 
     public static ORB init(String[] args, java.util.Properties props) {
         String orbClassName = null;
 
         if (props != null)
-            orbClassName = props.getProperty("DEFAULT_ORB_CLASS_NAME");
+            orbClassName = props.getProperty(ORBClassPropertyKey);
 
         if (orbClassName == null)
-            orbClassName = getSystemProperty("DEFAULT_ORB_CLASS_NAME");
+            orbClassName = getSystemProperty(ORBClassPropertyKey);
 
         if (orbClassName == null)
             orbClassName = "org.apache.yoko.orb.CORBA.ORB";
@@ -200,11 +203,11 @@
         String orbClassName = null;
 
         if (props != null)
-            orbClassName = props.getProperty("DEFAULT_ORB_CLASS_NAME");
+            orbClassName = props.getProperty(ORBClassPropertyKey);
 
         try {
             if (orbClassName == null)
-                orbClassName = getSystemProperty("DEFAULT_ORB_CLASS_NAME");
+                orbClassName = getSystemProperty(ORBClassPropertyKey);
         } catch (SecurityException ex) {
             // ignore
         }
@@ -232,7 +235,11 @@
 
     public static ORB init() {
         if (ORBSingleton_ == null) {
-            String orbClassName = "org.apache.yoko.orb.CORBA.ORBSingleton";
+            String orbClassName = getSystemProperty(ORBSingletonPropertyKey);
+        
+            if (orbClassName == null) {
+                orbClassName = "org.apache.yoko.orb.CORBA.ORBSingleton";
+            }
 
             ORB orb;
 



Mime
View raw message