geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r396951 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent: ./ META-INF/ src/org/apache/geronimo/st/jmxagent/
Date Tue, 25 Apr 2006 18:50:12 GMT
Author: sppatel
Date: Tue Apr 25 11:50:08 2006
New Revision: 396951

URL: http://svn.apache.org/viewcvs?rev=396951&view=rev
Log:
refactor not to dependend on v11 runtime jars to avoid circular dependency

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF?rev=396951&r1=396950&r2=396951&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF
Tue Apr 25 11:50:08 2006
@@ -10,7 +10,6 @@
  org.eclipse.wst.common.modulecore,
  org.eclipse.jst.j2ee,
  org.eclipse.core.resources,
- org.apache.geronimo.runtime.v11,
  org.eclipse.wst.common.project.facet.core,
  org.eclipse.jem.util,
  org.eclipse.emf.ecore
@@ -39,6 +38,8 @@
  mx4j.server.interceptor,
  mx4j.timer,
  mx4j.util,
+ org.apache.commons.logging,
+ org.apache.commons.logging.impl,
  org.apache.geronimo.st.jmxagent,
  org.omg.stub.javax.management.remote.rmi
 Bundle-ClassPath: lib/mx4j-remote-3.0.1.jar,

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml?rev=396951&r1=396950&r2=396951&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
Tue Apr 25 11:50:08 2006
@@ -134,16 +134,4 @@
             </plugin>
         </plugins>
     </build>
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.geronimo.devtools</groupId>
-            <artifactId>org.apache.geronimo.runtime.common</artifactId>
-            <version>${org.apache.geronimo.runtime.common_version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.devtools</groupId>
-            <artifactId>org.apache.geronimo.runtime.v11</artifactId>
-            <version>${org.apache.geronimo.runtime.v11_version}</version>
-        </dependency>
-    </dependencies>
 </project>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java?rev=396951&r1=396950&r2=396951&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
Tue Apr 25 11:50:08 2006
@@ -20,7 +20,6 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.IPath;
@@ -33,8 +32,8 @@
 
 public class ConfigurationStoreResolver implements ConfigurationStoreResolverMBean {
 
-	public Set resolve(Artifact artifact, String module, String path) {
-		IProject project = getProject(artifact);
+	public Set resolve(String configId, String module, String path) {
+		IProject project = getProject(configId);
 
 		if (project == null) {
 			// error couldn't find project for artifact throw exception
@@ -92,7 +91,7 @@
 
 	}
 
-	public IProject getProject(Artifact artifact) {
+	public IProject getProject(String configId) {
 		// get IProject from IModule with persisted configID
 		return null;
 	}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java?rev=396951&r1=396950&r2=396951&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
Tue Apr 25 11:50:08 2006
@@ -17,10 +17,8 @@
 
 import java.util.Set;
 
-import org.apache.geronimo.kernel.repository.Artifact;
-
 public interface ConfigurationStoreResolverMBean {
 	
-	public Set resolve(Artifact artifact, String module, String path);
+	public Set resolve(String configId, String module, String path);
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java?rev=396951&r1=396950&r2=396951&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
Tue Apr 25 11:50:08 2006
@@ -38,7 +38,7 @@
 	private static int DEFAULT_PORT = 8090;
 
 	private JMXAgent() {
-		init();
+		
 	}
 
 	public static JMXAgent getInstance() {
@@ -53,13 +53,14 @@
 		} catch (MalformedURLException e) {
 			e.printStackTrace();
 		}
-		server = MBeanServerFactory.createMBeanServer();
 		loadBean(ConfigurationStoreResolver.class.getName(), "ConfigStoreResolver:name=resolver");
 	}
 
 	public void start() throws IOException {
-		if (connectorServer == null) 
-			connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);
+		if (connectorServer == null) {
+			init();
+			connectorServer = JMXConnectorServerFactory.newJMXConnectorServer(url, null, getServer());
+		}
 		
 		if (!connectorServer.isActive())
 			connectorServer.start();
@@ -72,9 +73,15 @@
 
 	public void loadBean(String className, String objectName) {
 		try {
-			server.createMBean(className, new ObjectName(objectName));
+			getServer().createMBean(className, new ObjectName(objectName));
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
+	}
+	
+	private MBeanServer getServer() {
+		if(server == null)
+			server = MBeanServerFactory.createMBeanServer();
+		return server;
 	}
 }



Mime
View raw message