cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Halligan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-6041) Corba Binding is throwing a ObjectNotActive Corba exception being thrown back to application code on endpoint/bus shutdown
Date Thu, 09 Oct 2014 09:17:33 GMT
Keith Halligan created CXF-6041:
-----------------------------------

             Summary: Corba Binding is throwing a ObjectNotActive Corba exception being thrown
back to application code on endpoint/bus shutdown
                 Key: CXF-6041
                 URL: https://issues.apache.org/jira/browse/CXF-6041
             Project: CXF
          Issue Type: Bug
          Components: CORBA Binding
    Affects Versions: 3.0.1, 2.7.12
         Environment: Linux, and Windows, although should be evident on all platforms
            Reporter: Keith Halligan
             Fix For: 2.7.13, 3.0.2


On updating CXF from 2.3.5 to 2.7.12 in our product we noticed that our CorbaBinding tests
are failing during bus shutdown with the ORB (Orbix in this case).

It appears that a CXF commit around CXF 2.5 added a "deactivate()" call into the CorbaDestination.stop()
method: 
{noformat}
commit 88835b13e975c1716cc241c3caaf886c1f52ca40
Author: J. Daniel Kulp <dkulp@apache.org>
Date:   Fri Mar 23 14:54:49 2012 +0000

    Fix problem with calling stop()on Corba endpoints not properly
    de-registering the endpoint.

    git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1304394 13f79535-47bb-0310-9956-ffa450edef68
{noformat}

This method gets hit during either Endpoint.stop() call or a Bus.shutdown() call, when we've
already published a Corba Endpoint (via the JAX_WS Endpoint.publish() api.  The stop()/shutdown()
results in an ObjectNotActive Corba exception being thrown.  From what I can see, I'd gather
we've one of two scenarios happening here:
 - There's another deactivate_object() call on a POA instance with the same oid, the second
call will emit an ObjectNotActive.
 - The objectId is never in the AOM, and deactivate_object() will throw the exception when
it can't be found.
 
Either way expecting the application code to catch such an exception isn't the right thing
to be doing IMO.

Below is a proposed git patch for 2.7.12 (it's identical for 3.0.1), that will have CXF consume
the ObjectNotActive exception, and just log (at info level) that it's being caught.

{noformat}
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
index b94de2f..ed1deb9 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/CorbaDestination.java
@@ -52,6 +52,7 @@ import org.omg.PortableServer.LifespanPolicyValue;
 import org.omg.PortableServer.POA;
 import org.omg.PortableServer.POAHelper;
 import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.POAPackage.ObjectNotActive;
 import org.omg.PortableServer.RequestProcessingPolicyValue;
 import org.omg.PortableServer.Servant;
 import org.omg.PortableServer.ThreadPolicyValue;
@@ -356,6 +357,9 @@ public class CorbaDestination implements MultiplexDestination {

             try {
                 bindingPOA.deactivate_object(objectId);
+            } catch (ObjectNotActive ona) {
+                LOG.info("Caught ObjectNotActive exception: " + ona
+                         + " during deactivate_object() call on POA: " + bindingPOA);
             } catch (Exception ex) {
                 throw new CorbaBindingException("Unable to deactivate CORBA servant", ex);
             }
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message