camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" ...@silverbullet.dk>
Subject RE: svn commit: r671179 - /activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Date Tue, 24 Jun 2008 14:23:23 GMT
Maybe the useJMX should be marked as @deperacted.

Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: hadrian@apache.org [mailto:hadrian@apache.org] 
Sent: 24. juni 2008 16:19
To: camel-commits@activemq.apache.org
Subject: svn commit: r671179 - /activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java

Author: hadrian
Date: Tue Jun 24 07:19:04 2008
New Revision: 671179

URL: http://svn.apache.org/viewvc?rev=671179&view=rev
Log:
CAMEL-606.  Add back useJmx as its removal breaks binary/source compatibility for other projects,
such as smx.

Modified:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=671179&r1=671178&r2=671179&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Tue Jun 24 07:19:04 2008
@@ -68,6 +68,8 @@
     private static final Log LOG = LogFactory.getLog(CamelContextFactoryBean.class);
 
     @XmlAttribute(required = false)
+    private Boolean useJmx = Boolean.TRUE;
+    @XmlAttribute(required = false)
     private Boolean autowireRouteBuilders = Boolean.TRUE;
     @XmlAttribute(required = false)
     private Boolean tracing;
@@ -152,7 +154,7 @@
         // lets force any lazy creation
         getContext().addRouteDefinitions(routes);
 
-        if (camelJMXAgent != null) {
+        if (camelJMXAgent != null && isJmxEnabled()) {
             if (camelJMXAgent.isDisabled() != null && camelJMXAgent.isDisabled())
{
                 getContext().setLifecycleStrategy(new DefaultLifecycleStrategy());
             } else {
@@ -303,6 +305,18 @@
         return beanPostProcessor;
     }
 
+    public boolean isJmxEnabled() {
+        return useJmx != null && useJmx.booleanValue();
+    }
+
+    public Boolean getUseJmx() {
+        return useJmx;
+    }
+
+    public void setUseJmx(Boolean useJmx) {
+        this.useJmx = useJmx;
+    }
+
     public void setCamelJMXAgent(CamelJMXAgentType agent) {
         camelJMXAgent = agent;
     }



Mime
View raw message