geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r398929 - in /geronimo/devtools/eclipse-plugin/trunk: config-store-service/ config-store-service/src/main/java/org/apache/geronimo/devtools/ config-store-service/src/main/resources/ plugins/org.apache.geronimo.st.core/src/org/apache/geronim...
Date Tue, 02 May 2006 12:33:15 GMT
Author: sppatel
Date: Tue May  2 05:32:10 2006
New Revision: 398929

URL: http://svn.apache.org/viewcvs?rev=398929&view=rev
Log:
add debugging, repo placeholder

Added:
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/ExternalEclipseRepository.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
    geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DistributeCommand.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.jmxagent/pom.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/ConfigStoreInstaller.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java

Modified: 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=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/pom.xml Tue May  2 05:32:10
2006
@@ -26,5 +26,10 @@
       <artifactId>mx4j</artifactId>
       <version>3.0.1</version>
     </dependency>
+    <dependency>
+   	  <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.0.4</version>
+    </dependency>
   </dependencies>
 </project>

Modified: 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=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/EclipseAwareConfigurationStore.java
Tue May  2 05:32:10 2006
@@ -25,6 +25,8 @@
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.kernel.Kernel;
@@ -32,31 +34,46 @@
 import org.apache.geronimo.kernel.repository.WritableListableRepository;
 import org.apache.geronimo.system.configuration.RepositoryConfigurationStore;
 
-public class EclipseAwareConfigurationStore extends
-		RepositoryConfigurationStore {
+public class EclipseAwareConfigurationStore extends RepositoryConfigurationStore {
+
+	private static final Log log = LogFactory.getLog(EclipseAwareConfigurationStore.class);
 
 	public EclipseAwareConfigurationStore(WritableListableRepository repository) {
+
 		super(repository);
 	}
 
-	public EclipseAwareConfigurationStore(Kernel kernel, String objectName,
-			WritableListableRepository repository) {
+	public EclipseAwareConfigurationStore(Kernel kernel, String objectName, WritableListableRepository
repository) {
 		super(kernel, objectName, repository);
+		log.debug("EclipseAwareConfigurationStore()");
 	}
 
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.system.configuration.RepositoryConfigurationStore#resolve(org.apache.geronimo.kernel.repository.Artifact,
+	 *      java.lang.String, java.lang.String)
+	 */
 	public Set resolve(Artifact artifact, String module, String path) {
+
+		log.debug("--> EclipseAwareConfigurationStore.resolve()");
+
+		Set result = Collections.EMPTY_SET;
 		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;
+
+			log.debug("Resolving: " + artifact + " " + module + " " + path);
+
+			result = (Set) connection.invoke(on, "resolve", new Object[] { artifact, module, path
}, new String[] { "java.lang.String", "java.lang.String", "java.lang.String" });
+
+			log.debug("Resolved to: " + result);
+
 		} catch (Exception e) {
 			e.printStackTrace();
 		} finally {
@@ -67,8 +84,7 @@
 					e.printStackTrace();
 				}
 		}
-
-		return Collections.EMPTY_SET;
+		return result;
 	}
 
 	public static final GBeanInfo GBEAN_INFO;
@@ -78,8 +94,7 @@
 		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" });
+		builder.setConstructor(new String[] { "kernel", "objectName", "Repository" });
 		GBEAN_INFO = builder.getBeanInfo();
 	}
 

Added: geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/ExternalEclipseRepository.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/ExternalEclipseRepository.java?rev=398929&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/ExternalEclipseRepository.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/java/org/apache/geronimo/devtools/ExternalEclipseRepository.java
Tue May  2 05:32:10 2006
@@ -0,0 +1,51 @@
+/**
+ * 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.File;
+import java.net.URI;
+
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.system.repository.Maven2Repository;
+import org.apache.geronimo.system.serverinfo.ServerInfo;
+
+public class ExternalEclipseRepository extends Maven2Repository {
+
+	public ExternalEclipseRepository(File arg0) {
+		super(arg0);
+	}
+
+	public ExternalEclipseRepository(URI arg0, ServerInfo arg1) {
+		super(arg0, arg1);
+	}
+	
+    public static final GBeanInfo GBEAN_INFO;
+
+    static {
+        GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(ExternalEclipseRepository.class,
"Repository");
+        infoFactory.addAttribute("root", URI.class, true);
+        infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean");
+        infoFactory.addInterface(ExternalEclipseRepository.class);
+        infoFactory.setConstructor(new String[]{"root", "ServerInfo"});
+        GBEAN_INFO = infoFactory.getBeanInfo();
+    }
+
+    public static GBeanInfo getGBeanInfo() {
+        return GBEAN_INFO;
+    }
+
+}

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

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

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

Modified: 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=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/config-store-service/src/main/resources/plan.xml
Tue May  2 05:32:10 2006
@@ -56,11 +56,25 @@
             </dependency>-->
         </dependencies>
   	</environment>
+  	
+  	<!--<gbean name="ExternalEclipseRepository" class="org.apache.geronimo.devtools.ExternalEclipseRepository">
+    	<attribute name="root">eclipse-repository/</attribute>
+    	<reference name="ServerInfo">
+     		<name>ServerInfo</name>
+    	</reference>
+  	</gbean>-->
+  	
+  	<gbean name="ExternalEclipseRepository" class="org.apache.geronimo.system.repository.Maven2Repository">
+    	<attribute name="root">eclipse-repository/</attribute>
+    	<reference name="ServerInfo">
+     		<name>ServerInfo</name>
+    	</reference>
+  	</gbean>
 
     <!--Configuration Store service-->
     <gbean name="EclipseConfigStore" class="org.apache.geronimo.devtools.EclipseAwareConfigurationStore">
         <reference name="Repository">
-            <name>Repository</name>
+            <name>ExternalEclipseRepository</name>
         </reference>
     </gbean>
 </configuration>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DistributeCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DistributeCommand.java?rev=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DistributeCommand.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DistributeCommand.java
Tue May  2 05:32:10 2006
@@ -68,6 +68,9 @@
 		} else {
 			file = DeploymentUtils.createJarFile(getModule());
 		}
+		
+		Trace.trace(Trace.INFO, "Target: " + targets[0]);
+		Trace.trace(Trace.INFO, "File: " + file.getAbsolutePath());
 
 		return new DeploymentCmdStatus(Status.OK_STATUS, getDeploymentManager().distribute(targets,
file, null));
 	}

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=398929&r1=398928&r2=398929&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 May  2 05:32:10 2006
@@ -10,7 +10,7 @@
         <version>1.0</version>
     </parent>
     <properties>
-    	<configStoreServiceVersion>1.0-SNAPSHOT</configStoreServiceVersion>
+    	<configStoreServiceVersion>1.0</configStoreServiceVersion>
     </properties>
     <build>
         <resources>

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/ConfigStoreInstaller.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/ConfigStoreInstaller.java?rev=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/ConfigStoreInstaller.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/ConfigStoreInstaller.java
Tue May  2 05:32:10 2006
@@ -32,6 +32,9 @@
 	private void install(IServer server) {
 		Trace.trace(Trace.INFO, "--> ConfigStoreInstaller.install()");
 		try {
+			
+			//temporary until custom repo is implemented inside workspace metadata
+			server.getRuntime().getLocation().append("eclipse-repository").toFile().mkdir();
 
 			JMXDeploymentManager dm = (JMXDeploymentManager) GeronimoConnectionFactory.getInstance().getDeploymentManager(server);
 			dm.setInPlace(false);
@@ -39,7 +42,7 @@
 			Target target = dm.getTargets()[0];
 			Trace.trace(Trace.INFO, "target name: " + target.getName());
 
-			File jar = new File(resolveFromBundle("/lib/config-store-service-1.0-SNAPSHOT.jar").getFile());
+			File jar = new File(resolveFromBundle("/lib/config-store-service-1.0.jar").getFile());
 			File plan = new File(resolveFromBundle("/plan.xml").getFile());
 
 			ProgressObject po = dm.distribute(new Target[] { target }, jar, plan);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java?rev=398929&r1=398928&r2=398929&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
Tue May  2 05:32:10 2006
@@ -15,7 +15,6 @@
  */
 package org.apache.geronimo.st.v11.core;
 
-import java.io.IOException;
 import java.net.MalformedURLException;
 import java.util.HashMap;
 import java.util.Map;
@@ -37,7 +36,6 @@
 import org.apache.geronimo.st.core.GenericGeronimoServerBehaviour;
 import org.apache.geronimo.st.core.GeronimoConnectionFactory;
 import org.apache.geronimo.st.jmxagent.Activator;
-import org.apache.geronimo.st.jmxagent.JMXAgent;
 import org.apache.geronimo.st.v11.core.internal.Trace;
 import org.apache.geronimo.system.jmx.KernelDelegate;
 import org.eclipse.core.runtime.CoreException;
@@ -172,12 +170,7 @@
 
 	protected void setupLaunch(ILaunch launch, String launchMode, IProgressMonitor monitor)
throws CoreException {
 		if (SocketUtil.isLocalhost(getServer().getHost())) {
-			try {
-				JMXAgent.getInstance().start();
-				getServer().addServerListener(new ConfigStoreInstaller());
-			} catch (IOException e) {
-				e.printStackTrace();
-			}
+			getServer().addServerListener(new ConfigStoreInstaller());
 		}
 		super.setupLaunch(launch, launchMode, monitor);
 	}



Mime
View raw message