geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r396888 - in /geronimo/devtools/eclipse-plugin/trunk/config-store-service: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/geronimo/ src/main/java/org/apache/geronimo/devtools/ src/main...
Date Tue, 25 Apr 2006 13:57:03 GMT
Author: sppatel
Date: Tue Apr 25 06:55:55 2006
New Revision: 396888

URL: http://svn.apache.org/viewcvs?rev=396888&view=rev
Log:
initial drop of eclipse aware configuration store

Added:
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml   (with props)
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
  (with props)

Added: geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml?rev=396888&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml Tue Apr 25 06:55:55
2006
@@ -0,0 +1,30 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.geronimo.devtools</groupId>
+  <artifactId>config-store-service</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>Eclipse Aware Configuration Store Service</name>
+  <dependencies>
+    <dependency>
+      <groupId>geronimo</groupId>
+      <artifactId>geronimo-kernel</artifactId>
+      <version>1.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>geronimo</groupId>
+      <artifactId>geronimo-system</artifactId>
+      <version>1.1-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>mx4j</groupId>
+      <artifactId>mx4j-remote</artifactId>
+      <version>3.0.1</version>
+    </dependency>
+    <dependency>
+   	  <groupId>mx4j</groupId>
+      <artifactId>mx4j</artifactId>
+      <version>3.0.1</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java?rev=396888&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
Tue Apr 25 06:55:55 2006
@@ -0,0 +1,90 @@
+/**
+ * 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.devtools;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.WritableListableRepository;
+import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
+
+public class EclipseAwareConfigurationStore extends
+		RepositoryConfigurationStore {
+
+	public EclipseAwareConfigurationStore(WritableListableRepository repository) {
+		super(repository);
+	}
+
+	public EclipseAwareConfigurationStore(Kernel kernel, String objectName,
+			WritableListableRepository repository) {
+		super(kernel, objectName, repository);
+	}
+
+	public Set resolve(Artifact artifact, String module, String path) {
+		JMXConnector connector = null;
+		try {
+			JMXServiceURL address = new JMXServiceURL("hessian", null, 8090, "/hessian");
+			connector = JMXConnectorFactory.connect(address);
+			MBeanServerConnection connection = connector.getMBeanServerConnection();
+
+			ObjectName on = ObjectName.getInstance("ConfigStoreResolver:name=resolver");
+			Set result = (Set) connection.invoke(on, "resolve", new Object[] {
+					artifact, module, path }, new String[] {
+					Artifact.class.getName(), "java.lang.String",
+					"java.lang.String" });
+			return result;
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+			if (connector != null)
+				try {
+					connector.close();
+				} catch (IOException e) {
+					e.printStackTrace();
+				}
+		}
+
+		return Collections.EMPTY_SET;
+	}
+
+	public static final GBeanInfo GBEAN_INFO;
+
+	static {
+		GBeanInfoBuilder builder = GBeanInfoBuilder.createStatic(EclipseAwareConfigurationStore.class,
"ConfigurationStore");
+		builder.addAttribute("kernel", Kernel.class, false);
+		builder.addAttribute("objectName", String.class, false);
+		builder.addReference("Repository", WritableListableRepository.class, "Repository");
+		builder.setConstructor(new String[] { "kernel", "objectName",
+				"Repository" });
+		GBEAN_INFO = builder.getBeanInfo();
+	}
+
+	public static GBeanInfo getGBeanInfo() {
+		return GBEAN_INFO;
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml?rev=396888&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
Tue Apr 25 06:55:55 2006
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    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.
+-->
+<configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+	<environment>
+    	<configId>
+      		<groupId>default</groupId>
+      		<artifactId>eclipse-config-store</artifactId>
+      		<version>1.0</version>
+      		<type>car</type>
+    	</configId>
+        <dependencies>
+            <dependency>
+                <groupId>geronimo</groupId>
+                <artifactId>rmi-naming</artifactId>
+                <type>car</type>
+            </dependency>
+            <dependency>
+                <groupId>mx4j</groupId>
+                <artifactId>mx4j-tools</artifactId>
+                <type>jar</type>
+            </dependency>
+            <dependency>
+                <groupId>hessian</groupId>
+                <artifactId>hessian</artifactId>
+                <type>jar</type>
+            </dependency>
+        </dependencies>
+  	</environment>
+
+    <!--Configuration Store service-->
+    <gbean name="EclipseConfigStore" class="org.apache.geronimo.devtools.EclipseAwareConfigurationStore">
+        <reference name="Repository">
+            <name>Repository</name>
+        </reference>
+    </gbean>
+</configuration>
\ No newline at end of file

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev

Propchange: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message