Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 99162 invoked from network); 25 Apr 2006 14:00:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Apr 2006 14:00:19 -0000 Received: (qmail 90250 invoked by uid 500); 25 Apr 2006 13:59:27 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 90228 invoked by uid 500); 25 Apr 2006 13:59:27 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 90217 invoked by uid 99); 25 Apr 2006 13:59:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2006 06:59:27 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 25 Apr 2006 06:59:26 -0700 Received: (qmail 98337 invoked by uid 65534); 25 Apr 2006 13:58:13 -0000 Message-ID: <20060425135806.98193.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: sppatel@apache.org X-Mailer: svnmailer-1.0.8 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 @@ + + 4.0.0 + org.apache.geronimo.devtools + config-store-service + jar + 1.0-SNAPSHOT + Eclipse Aware Configuration Store Service + + + geronimo + geronimo-kernel + 1.1-SNAPSHOT + + + geronimo + geronimo-system + 1.1-SNAPSHOT + + + mx4j + mx4j-remote + 3.0.1 + + + mx4j + mx4j + 3.0.1 + + + 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 @@ + + + + + + default + eclipse-config-store + 1.0 + car + + + + geronimo + rmi-naming + car + + + mx4j + mx4j-tools + jar + + + hessian + hessian + jar + + + + + + + + Repository + + + \ 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