cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r358855 - in /cocoon/trunk/src/java/org/apache/cocoon/core/container/handler: AbstractComponentHandler.java LazyHandler.java ThreadSafeComponentHandler.java
Date Fri, 23 Dec 2005 19:29:19 GMT
Author: giacomo
Date: Fri Dec 23 11:29:15 2005
New Revision: 358855

URL: http://svn.apache.org/viewcvs?rev=358855&view=rev
Log:
more JMX support stuff

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/AbstractComponentHandler.java
    cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/LazyHandler.java
    cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/ThreadSafeComponentHandler.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/AbstractComponentHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/AbstractComponentHandler.java?rev=358855&r1=358854&r2=358855&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/AbstractComponentHandler.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/AbstractComponentHandler.java
Fri Dec 23 11:29:15 2005
@@ -29,6 +29,7 @@
 import org.apache.cocoon.core.container.ComponentFactory;
 import org.apache.cocoon.core.container.DefaultServiceSelector;
 import org.apache.cocoon.core.container.StandaloneServiceSelector;
+import org.apache.cocoon.util.JMXUtils;
 
 /**
  * This class acts like a Factory to instantiate the correct version
@@ -286,6 +287,8 @@
         ComponentInfo info = new ComponentInfo();
         info.setServiceClassName(clazz.getName());
         info.setConfiguration(config);
+        info.setJmxDomain(JMXUtils.findJmxDomain(info.getJmxDomain(), manager));
+        info.setJmxName(JMXUtils.findJmxName(info.getJmxName(), clazz.getName()));
         return getComponentHandler(null, env, info);
 
     }

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/LazyHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/LazyHandler.java?rev=358855&r1=358854&r2=358855&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/LazyHandler.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/LazyHandler.java Fri Dec
23 11:29:15 2005
@@ -20,6 +20,7 @@
 import org.apache.cocoon.components.ComponentInfo;
 import org.apache.cocoon.core.CoreResourceNotFoundException;
 import org.apache.cocoon.core.container.ComponentEnvironment;
+import org.apache.cocoon.util.JMXUtils;
 
 /**
  * 
@@ -48,9 +49,12 @@
             ComponentInfo info = new ComponentInfo();
             info.setConfiguration(config);
             info.setServiceClassName(className);
+            info.setJmxDomain(JMXUtils.findJmxDomain(info.getJmxDomain(), this.compEnv.serviceManager));
+            info.setJmxName(JMXUtils.findJmxName(info.getJmxName(), className));
 
             this.delegate = AbstractComponentHandler.getComponentHandler(role, compEnv, info);
             this.delegate.initialize();
+            JMXUtils.setupJmxFor(this.delegate, info);
         }
         
         return this.delegate;
@@ -121,6 +125,8 @@
             final ComponentInfo info = new ComponentInfo();
             info.setServiceClassName(className);
             info.setConfiguration(config);
+            info.setJmxDomain(JMXUtils.findJmxDomain(info.getJmxDomain(), this.compEnv.serviceManager));
+            info.setJmxName(JMXUtils.findJmxName(info.getJmxName(), className));
             return info;
         } 
         return this.delegate.getInfo();

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/ThreadSafeComponentHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/ThreadSafeComponentHandler.java?rev=358855&r1=358854&r2=358855&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/ThreadSafeComponentHandler.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/ThreadSafeComponentHandler.java
Fri Dec 23 11:29:15 2005
@@ -19,6 +19,7 @@
 import org.apache.avalon.framework.logger.Logger;
 import org.apache.cocoon.components.ComponentInfo;
 import org.apache.cocoon.core.container.ComponentFactory;
+import org.apache.cocoon.util.JMXUtils;
 
 /**
  * The ThreadSafeComponentHandler to make sure components are initialized
@@ -52,6 +53,7 @@
     public void doInitialize() throws Exception {
         if( this.instance == null ) {
             this.instance = this.factory.newInstance();
+            JMXUtils.setupJmxFor(this.instance, getInfo(), logger);
         }
     }
 



Mime
View raw message