Author: ay
Date: Mon Apr  2 11:12:21 2012
New Revision: 1308300

URL: http://svn.apache.org/viewvc?rev=1308300&view=rev
Log:
CXF-4218 2.5.x workaround to avoid jmx exception

Modified:
    
cxf/branches/2.5.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java

Modified: 
cxf/branches/2.5.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java?rev=1308300&r1=1308299&r2=1308300&view=diff
==============================================================================
--- 
cxf/branches/2.5.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
 (original)
+++ 
cxf/branches/2.5.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMEndpoint.java
 Mon Apr  2 11:12:21 2012
@@ -264,6 +264,13 @@ public class RMEndpoint {
         createService();
         createEndpoint(d);
         setPolicies();
+        // CXF-4218 requires a change in the DB schema, which is not practical
+        // for the released 2.5.x. Thus, this is a workaround for 2.5.x to 
avoid getting 
+        // the duplicate jmx registration error.
+        if (!ProtocolVariation.RM10WSA200408.equals(protocol)) {
+            LOG.log(Level.INFO, "Skip monitoring for protocol: " + protocol);
+            return;
+        }
         if (manager != null && manager.getBus() != null) {
             managedEndpoint = new ManagedRMEndpoint(this);
             instrumentationManager = 
manager.getBus().getExtension(InstrumentationManager.class);        


Reply via email to