You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by sp...@apache.org on 2006/04/24 22:01:45 UTC

svn commit: r396671 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent: ./ META-INF/ src/ src/mx4j/ src/mx4j/server/ src/org/ src/org/apache/ src/org/apache/geronimo/ src/org/apache/geronimo/st/ src/org/apache/geronimo...

Author: sppatel
Date: Mon Apr 24 13:01:42 2006
New Revision: 396671

URL: http://svn.apache.org/viewcvs?rev=396671&view=rev
Log:
add jmx agent plugin 

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.classpath
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.project
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/
    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/build.properties   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/mx4j/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/mx4j/server/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java   (with props)

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.classpath
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.classpath?rev=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.classpath (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.classpath Mon Apr 24 13:01:42 2006
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry exported="true" kind="lib" path="lib/mx4j-remote-3.0.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/mx4j-3.0.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/org.mortbay.jetty-5.1.10.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/mx4j-tools-3.0.1.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/hessian-3.0.8.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/geronimo-servlet_2.4_spec-1.0.jar"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-logging-1.0.4.jar"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.project
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.project?rev=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.project (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/.project Mon Apr 24 13:01:42 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.geronimo.st.jmxagent</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: 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=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/META-INF/MANIFEST.MF Mon Apr 24 13:01:42 2006
@@ -0,0 +1,47 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Geronimo Server Tools JMX Agent Plug-in
+Bundle-SymbolicName: org.apache.geronimo.st.jmxagent
+Bundle-Version: 1.0.0
+Bundle-Activator: org.apache.geronimo.st.jmxagent.Activator
+Bundle-Vendor: Apache
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.jst.j2ee,
+ org.eclipse.core.resources,
+ org.apache.geronimo.runtime.v11
+Eclipse-AutoStart: true
+Export-Package: javax.management,
+ javax.management.loading,
+ javax.management.modelmbean,
+ javax.management.monitor,
+ javax.management.openmbean,
+ javax.management.relation,
+ javax.management.remote,
+ javax.management.remote.rmi,
+ javax.management.timer,
+ mx4j,
+ mx4j.loading,
+ mx4j.log,
+ mx4j.monitor,
+ mx4j.persist,
+ mx4j.remote,
+ mx4j.remote.provider.iiop,
+ mx4j.remote.provider.rmi,
+ mx4j.remote.resolver.iiop,
+ mx4j.remote.resolver.rmi,
+ mx4j.remote.rmi,
+ mx4j.server,
+ mx4j.server.interceptor,
+ mx4j.timer,
+ mx4j.util,
+ org.apache.geronimo.st.jmxagent,
+ org.omg.stub.javax.management.remote.rmi
+Bundle-ClassPath: lib/mx4j-remote-3.0.1.jar,
+ lib/mx4j-3.0.1.jar,
+ lib/org.mortbay.jetty-5.1.10.jar,
+ lib/mx4j-tools-3.0.1.jar,
+ lib/hessian-3.0.8.jar,
+ lib/geronimo-servlet_2.4_spec-1.0.jar,
+ lib/commons-logging-1.0.4.jar

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties?rev=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties Mon Apr 24 13:01:42 2006
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = target/classes/
+bin.includes = META-INF/,\
+               .

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/build.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml Mon Apr 24 13:01:42 2006
@@ -0,0 +1,120 @@
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.geronimo.st.jmxagent</artifactId>
+    <packaging>jar</packaging>
+    <version>${org.apache.geronimo.st.jmxagent_version}</version>
+    <name>${artifactId}</name>
+    <parent>
+        <groupId>org.apache.geronimo.devtools</groupId>
+        <artifactId>eclipse-plugins-parent</artifactId>
+        <version>1.0</version>
+    </parent>
+    <build>
+        <resources>
+            <resource>
+                <directory>.</directory>
+                <includes>
+                    <include>.options</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>lib</directory>
+                <targetPath>lib</targetPath>
+                <includes>
+                    <include>*.jar</include>
+                </includes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>dependency-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                               <artifactItem>
+                           			<groupId>jetty</groupId>
+            						<artifactId>org.mortbay.jetty</artifactId>
+            						<version>5.1.10</version>
+                                </artifactItem>
+                                <artifactItem>
+                           			<groupId>hessian</groupId>
+            						<artifactId>hessian</artifactId>
+            						<version>3.0.8</version>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>mx4j</groupId>
+                                    <artifactId>mx4j-remote</artifactId>
+                                    <version>3.0.1</version>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>mx4j</groupId>
+                                    <artifactId>mx4j</artifactId>
+                                    <version>3.0.1</version>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>mx4j</groupId>
+                                    <artifactId>mx4j-tools</artifactId>
+                                    <version>3.0.1</version>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>commons-logging</groupId>
+                                    <artifactId>commons-logging</artifactId>
+                                    <version>1.0.4</version>
+                                </artifactItem>
+                                <artifactItem>
+                           			<groupId>org.apache.geronimo.specs</groupId>
+            						<artifactId>geronimo-servlet_2.4_spec</artifactId>
+            						<version>1.0</version>
+                                </artifactItem>
+                            </artifactItems>
+                            <outputDirectory>lib</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.geronimo.devtools</groupId>
+                <artifactId>maven-geronimodevtools-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>install-dependencies</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>manifestbundles</goal>
+                            <goal>download</goal>
+                            <goal>install</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+                    </archive>
+                </configuration>
+            </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>
\ No newline at end of file

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java?rev=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java Mon Apr 24 13:01:42 2006
@@ -0,0 +1,74 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.st.jmxagent;
+
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.apache.geronimo.st.jmxagent";
+
+	// The shared instance
+	private static Activator plugin;
+
+	/**
+	 * The constructor
+	 */
+	public Activator() {
+		plugin = this;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+		JMXAgent.getInstance().stop();
+		plugin = null;
+		super.stop(context);
+	}
+
+	/**
+	 * Returns the shared instance
+	 * 
+	 * @return the shared instance
+	 */
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	public static void log(int severity, String message, Throwable throwable) {
+		plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable));
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java Mon Apr 24 13:01:42 2006
@@ -0,0 +1,99 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.st.jmxagent;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+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;
+import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
+import org.eclipse.wst.common.componentcore.internal.WorkbenchComponent;
+import org.eclipse.wst.common.componentcore.internal.impl.WorkbenchComponentImpl;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+
+public class ConfigurationStoreResolver implements ConfigurationStoreResolverMBean {
+
+	public Set resolve(Artifact artifact, String module, String path) {
+		IProject project = getProject(artifact);
+
+		if (project == null) {
+			// error couldn't find project for artifact throw exception
+		}
+
+		if (module != null && J2EEProjectUtilities.isEARProject(project)) {
+			EARArtifactEdit edit = EARArtifactEdit.getEARArtifactEditForRead(project);
+			try {
+				IVirtualReference[] refs = edit.getComponentReferences();
+				for (int i = 0; i < refs.length; i++) {
+					IVirtualReference ref = refs[i];
+					String moduleURI = edit.getModuleURI(ref.getReferencedComponent());
+					if (moduleURI.equals(module)) {
+						// found module
+						project = ref.getReferencedComponent().getProject();
+					}
+				}
+			} finally {
+				if (edit != null)
+					edit.dispose();
+			}
+		}
+
+		Set urls = new HashSet();
+
+		if (path == null || path.length() == 0) {
+			StructureEdit moduleCore = StructureEdit.getStructureEditForRead(project);
+			try {
+				WorkbenchComponent component = moduleCore.getComponent();
+				IPath loc = ((WorkbenchComponentImpl) component).getDefaultSourceRoot();
+				try {
+					URL url = project.findMember(loc).getLocation().toFile().toURL();
+					urls.add(url);
+				} catch (MalformedURLException e) {
+					e.printStackTrace();
+				}
+
+			} finally {
+				if (moduleCore != null)
+					moduleCore.dispose();
+			}
+		} else {
+			// return output containers
+			IContainer[] containers = J2EEProjectUtilities.getOutputContainers(project);
+			for (int i = 0; i < containers.length; i++) {
+				try {
+					urls.add(containers[i].getLocation().toFile().toURL());
+				} catch (MalformedURLException e) {
+					e.printStackTrace();
+				}
+			}
+		}
+
+		return urls;
+
+	}
+
+	public IProject getProject(Artifact artifact) {
+		// get IProject from IModule with persisted configID
+		return null;
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolver.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java Mon Apr 24 13:01:42 2006
@@ -0,0 +1,26 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.st.jmxagent;
+
+import java.util.Set;
+
+import org.apache.geronimo.kernel.repository.Artifact;
+
+public interface ConfigurationStoreResolverMBean {
+	
+	public Set resolve(Artifact artifact, String module, String path);
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/ConfigurationStoreResolverMBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=396671&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java Mon Apr 24 13:01:42 2006
@@ -0,0 +1,80 @@
+/**
+ * Copyright 2004, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.st.jmxagent;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+
+
+public class JMXAgent {
+
+	private static JMXAgent INSTANCE = null;
+
+	private static MBeanServer server = null;
+	private static JMXServiceURL url = null;
+
+	private JMXConnectorServer connectorServer = null;
+
+	private static int DEFAULT_PORT = 8090;
+
+	private JMXAgent() {
+		init();
+	}
+
+	public static JMXAgent getInstance() {
+		if (INSTANCE == null)
+			INSTANCE = new JMXAgent();
+		return INSTANCE;
+	}
+
+	private void init() {
+		try {
+			url = new JMXServiceURL("hessian", null, DEFAULT_PORT, "/hessian");
+		} 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.isActive())
+			connectorServer.start();
+	}
+
+	public void stop() throws IOException {
+		if (connectorServer != null)
+			connectorServer.stop();
+	}
+
+	public void loadBean(String className, String objectName) {
+		try {
+			server.createMBean(className, new ObjectName(objectName));
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/src/org/apache/geronimo/st/jmxagent/JMXAgent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain