incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r554722 - in /incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba: CorbaConduit.java TypeMapCache.java utils/CorbaBindingHelper.java
Date Mon, 09 Jul 2007 18:04:24 GMT
Author: bravi
Date: Mon Jul  9 11:04:23 2007
New Revision: 554722

URL: http://svn.apache.org/viewvc?view=rev&rev=554722
Log:
[YOKO-397] - Clean up of the ORB & the type factory in the client side.

Modified:
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java?view=diff&rev=554722&r1=554721&r2=554722
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/CorbaConduit.java
Mon Jul  9 11:04:23 2007
@@ -80,7 +80,9 @@
         endpointInfo = ei;
         target = getTargetReference(ref);
         orbConfig = config;
+        CorbaBindingHelper.destroyDefaultORB();
         orb = CorbaBindingHelper.getDefaultORB(config);
+        TypeMapCache.clear();
         typeMap = TypeMapCache.get(ei.getService());
     }
 

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java?view=diff&rev=554722&r1=554721&r2=554722
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/TypeMapCache.java
Mon Jul  9 11:04:23 2007
@@ -47,4 +47,7 @@
         return null;
     }
 
+    public static void clear() {
+        cache.clear();
+    }
 }

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java?view=diff&rev=554722&r1=554721&r2=554722
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaBindingHelper.java
Mon Jul  9 11:04:23 2007
@@ -39,7 +39,6 @@
     private static ORB defaultORB;
     
     public static ORB getDefaultORB(OrbConfig config) {
-        
         if (defaultORB == null) {
             Properties props = System.getProperties();
             props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
@@ -55,6 +54,17 @@
         return defaultORB;
     }
     
+    public static void destroyDefaultORB() {
+        try {
+            if (defaultORB != null) {
+                defaultORB.shutdown(true);
+                defaultORB = null;
+            }
+        } catch (Exception ex) {
+            throw new CorbaBindingException(ex);
+        }
+    }
+
     public static ORB createAddressSpecificORB(String address, OrbConfig config) {
         ORB orb = null;
         



Mime
View raw message