incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r555716 - in /incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba: CorbaConduit.java utils/CorbaBindingHelper.java
Date Thu, 12 Jul 2007 18:39:06 GMT
Author: bravi
Date: Thu Jul 12 11:39:04 2007
New Revision: 555716

URL: http://svn.apache.org/viewvc?view=rev&rev=555716
Log:
[YOKO-397] - Reverting the change to the CorbaBindingHelper as it causes a bloat in the server
memory. Need to revisit this issue.

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/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=555716&r1=555715&r2=555716
==============================================================================
--- 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
Thu Jul 12 11:39:04 2007
@@ -69,6 +69,7 @@
 public class CorbaConduit implements Conduit {
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaConduit.class);
 
+
     private EndpointInfo endpointInfo;
     private EndpointReferenceType target;
     private MessageObserver incomingObserver;
@@ -133,9 +134,6 @@
 
     protected void finalize() throws Throwable {
         super.finalize();
-        if (orb != null) {
-            orb.destroy();
-        }
     }
 
     public EndpointReferenceType getTarget() {

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=555716&r1=555715&r2=555716
==============================================================================
--- 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
Thu Jul 12 11:39:04 2007
@@ -36,21 +36,24 @@
     private static final Logger LOG = LogUtils.getL7dLogger(CorbaBindingHelper.class);
     private static Map<String, ORB> orbList = new HashMap<String, ORB>();
     private static Map<String, Integer> orbUseCount = new HashMap<String, Integer>();
+    private static ORB defaultORB;
     
-    public static ORB getDefaultORB(OrbConfig config) {
-        Properties props = System.getProperties();
-        props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
-        props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
-        props.put("yoko.orb.id", "Yoko-Binding");
-        List<String> orbArgs = config.getOrbArgs();
-        ORB defaultORB = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
+    public static ORB getDefaultORB(OrbConfig config) {        
         if (defaultORB == null) {
-            LOG.severe("Could not create instance of the ORB");
-            throw new CorbaBindingException("Could not create instance of the ORB");
+            Properties props = System.getProperties();
+            props.put("org.omg.CORBA.ORBClass", config.getOrbClass());
+            props.put("org.omg.CORBA.ORBSingletonClass", config.getOrbSingletonClass());
+            props.put("yoko.orb.id", "Yoko-Binding");
+            List<String> orbArgs = config.getOrbArgs();
+            defaultORB = ORB.init(orbArgs.toArray(new String[orbArgs.size()]), props);
+            if (defaultORB == null) {
+                LOG.severe("Could not create instance of the ORB");
+                throw new CorbaBindingException("Could not create instance of the ORB");
+            }
         }
         return defaultORB;
-    }    
-
+    }
+    
     public static ORB createAddressSpecificORB(String address, OrbConfig config) {
         ORB orb = null;
         



Mime
View raw message