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/23 04:08:17 UTC
svn commit: r396197 - in /geronimo/devtools/eclipse-plugin/trunk/plugins:
org.apache.geronimo.runtime.common/ org.apache.geronimo.runtime.v11/
org.apache.geronimo.st.core/ org.apache.geronimo.st.core/META-INF/
org.apache.geronimo.st.core/src/org/apache...
Author: sppatel
Date: Sat Apr 22 19:08:14 2006
New Revision: 396197
URL: http://svn.apache.org/viewcvs?rev=396197&view=rev
Log:
share common libs in common plugin, refactor deployment factory instantiation
Added:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/.project
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/classpathXmlTemplate.vm
Modified:
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/.classpath
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServer.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoConnectionFactory.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/.project
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/.project?rev=396197&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/.project (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/.project Sat Apr 22 19:08:14 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.apache.geronimo.runtime.common</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.runtime.common/classpathXmlTemplate.vm
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/classpathXmlTemplate.vm?rev=396197&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/classpathXmlTemplate.vm (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.common/classpathXmlTemplate.vm Sat Apr 22 19:08:14 2006
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+#set($libs = $libDir.listFiles() )
+#foreach( $lib in $libs )
+ <classpathentry exported="true" kind="lib" path="lib/$lib.getName()"/>
+#end
+</classpath>
\ No newline at end of file
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.runtime.v11/pom.xml Sat Apr 22 19:08:14 2006
@@ -146,6 +146,11 @@
<artifactId>stax-api</artifactId>
<version>${staxApiVersion}</version>
</artifactItem>
+ <artifactItem>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-system</artifactId>
+ <version>${geronimoVersion}</version>
+ </artifactItem>
</artifactItems>
<outputDirectory>lib</outputDirectory>
</configuration>
@@ -205,6 +210,11 @@
<groupId>openejb</groupId>
<artifactId>openejb-builder</artifactId>
<version>${openejbVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-system</artifactId>
+ <version>${geronimoVersion}</version>
</dependency>
</dependencies>
</project>
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/.classpath
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/.classpath?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/.classpath (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/.classpath Sat Apr 22 19:08:14 2006
@@ -3,6 +3,5 @@
<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/geronimo-j2ee-deployment_1.1_spec-1.0.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/META-INF/MANIFEST.MF Sat Apr 22 19:08:14 2006
@@ -26,16 +26,10 @@
org.eclipse.jst.server.generic.core,
org.eclipse.wst.common.project.facet.core,
org.eclipse.jem.util,
- org.eclipse.jdt.core
+ org.eclipse.jdt.core,
+ org.apache.geronimo.runtime.common
Eclipse-AutoStart: true
-Export-Package: javax.enterprise.deploy.model,
- javax.enterprise.deploy.model.exceptions,
- javax.enterprise.deploy.shared,
- javax.enterprise.deploy.shared.factories,
- javax.enterprise.deploy.spi,
- javax.enterprise.deploy.spi.exceptions,
- javax.enterprise.deploy.spi.factories,
- javax.enterprise.deploy.spi.status,
- org.apache.geronimo.st.core,
+Export-Package: org.apache.geronimo.st.core,
org.apache.geronimo.st.core.commands,
+ org.apache.geronimo.st.core.internal,
org.apache.geronimo.st.core.operations
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServer.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServer.java?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GenericGeronimoServer.java Sat Apr 22 19:08:14 2006
@@ -15,8 +15,13 @@
*/
package org.apache.geronimo.st.core;
+import java.io.IOException;
import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.jst.server.core.IWebModule;
import org.eclipse.jst.server.generic.core.internal.GenericServer;
import org.eclipse.jst.server.generic.core.internal.Trace;
@@ -97,6 +102,18 @@
public void setHTTPPort(String value) {
getServerInstanceProperties().put(PROPERTY_HTTP_PORT, value);
+ }
+
+ public String discoverDeploymentFactoryClassName(IPath jarPath) {
+ try {
+ JarFile deployerJar = new JarFile(jarPath.toFile());
+ Manifest manifestFile = deployerJar.getManifest();
+ Attributes attributes = manifestFile.getMainAttributes();
+ return attributes.getValue("J2EE-DeploymentFactory-Implementation-Class");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return null;
}
}
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoConnectionFactory.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoConnectionFactory.java?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoConnectionFactory.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/GeronimoConnectionFactory.java Sat Apr 22 19:08:14 2006
@@ -41,7 +41,7 @@
if (dm == null) {
DeploymentFactoryManager mgr = DeploymentFactoryManager.getInstance();
- DeploymentFactory factory = discoverDeploymentFactory(server);
+ DeploymentFactory factory = getGeronimoServer(server).getDeploymentFactory();
mgr.registerDeploymentFactory(factory);
String deployerURL = getGeronimoServer(server).getDeployerURL();
Trace.trace(Trace.INFO, "DeployerURL: " + deployerURL);
@@ -52,21 +52,6 @@
connections.put(server.getId(), dm);
}
return dm;
- }
-
- private DeploymentFactory discoverDeploymentFactory(IServer server) {
- try {
- IPath path = getGeronimoServer(server).getJSR88DeployerJar();
- JarFile deployerJar = new JarFile(path.toFile());
- Manifest manifestFile = deployerJar.getManifest();
- Attributes attributes = manifestFile.getMainAttributes();
- String className = attributes.getValue("J2EE-DeploymentFactory-Implementation-Class");
- Class deploymentFactory = Class.forName(className);
- return (DeploymentFactory) deploymentFactory.newInstance();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
}
private IGeronimoServer getGeronimoServer(IServer server) {
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java Sat Apr 22 19:08:14 2006
@@ -16,6 +16,7 @@
package org.apache.geronimo.st.core;
import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
import org.eclipse.core.runtime.IPath;
@@ -32,6 +33,8 @@
public String getJMXServiceURL();
public IPath getJSR88DeployerJar();
+
+ public DeploymentFactory getDeploymentFactory();
public void configureDeploymentManager(DeploymentManager dm);
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/META-INF/MANIFEST.MF?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/META-INF/MANIFEST.MF Sat Apr 22 19:08:14 2006
@@ -7,7 +7,6 @@
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.apache.geronimo.st.core,
- org.apache.geronimo.runtime.v1,
org.apache.geronimo.deployment.model,
org.eclipse.jdt.core,
org.eclipse.jst.server.core,
@@ -19,7 +18,9 @@
org.eclipse.jst.j2ee,
org.eclipse.wst.web,
org.eclipse.wst.common.project.facet.core,
- org.eclipse.wst.common.frameworks
+ org.eclipse.wst.common.frameworks,
+ org.apache.geronimo.runtime.v1,
+ org.apache.geronimo.runtime.common
Eclipse-AutoStart: true
Bundle-Vendor: Apache
Export-Package: org.apache.geronimo.st.v1.core.operations,
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java Sat Apr 22 19:08:14 2006
@@ -16,7 +16,9 @@
package org.apache.geronimo.st.v1.core;
import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
import org.apache.geronimo.st.core.GenericGeronimoServer;
import org.apache.geronimo.st.core.IGeronimoVersionHandler;
@@ -26,7 +28,6 @@
public class GeronimoServer extends GenericGeronimoServer {
private static IGeronimoVersionHandler versionHandler = null;
-
/*
* (non-Javadoc)
*
@@ -100,6 +101,13 @@
*/
public void configureDeploymentManager(DeploymentManager dm) {
((JMXDeploymentManager) dm).setLogConfiguration(true, true);
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.IGeronimoServer#getDeploymentFactory()
+ */
+ public DeploymentFactory getDeploymentFactory() {
+ return new DeploymentFactoryImpl();
}
/*
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewcvs/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/META-INF/MANIFEST.MF Sat Apr 22 19:08:14 2006
@@ -24,5 +24,7 @@
org.apache.geronimo.deployment.model,
org.eclipse.wst.common.frameworks,
org.eclipse.core.commands,
- org.eclipse.wst.common.project.facet.core
+ org.eclipse.wst.common.project.facet.core,
+ org.apache.ant,
+ org.apache.geronimo.runtime.common
Eclipse-AutoStart: true
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.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/GeronimoServer.java?rev=396197&r1=396196&r2=396197&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java Sat Apr 22 19:08:14 2006
@@ -16,7 +16,9 @@
package org.apache.geronimo.st.v11.core;
import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.factories.DeploymentFactory;
+import org.apache.geronimo.deployment.plugin.factories.DeploymentFactoryImpl;
import org.apache.geronimo.deployment.plugin.jmx.JMXDeploymentManager;
import org.apache.geronimo.st.core.GenericGeronimoServer;
import org.apache.geronimo.st.core.IGeronimoVersionHandler;
@@ -91,6 +93,13 @@
*/
public IPath getJSR88DeployerJar() {
return getServer().getRuntime().getLocation().append("/lib/geronimo-deploy-jsr88-1.1-SNAPSHOT.jar");
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.geronimo.st.core.IGeronimoServer#getDeploymentFactory()
+ */
+ public DeploymentFactory getDeploymentFactory() {
+ return new DeploymentFactoryImpl();
}
/*
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=396197&r1=396196&r2=396197&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 Sat Apr 22 19:08:14 2006
@@ -32,9 +32,11 @@
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
import org.apache.geronimo.kernel.GBeanNotFoundException;
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.config.PersistentConfigurationList;
+import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.st.core.DeploymentUtils;
import org.apache.geronimo.st.core.GenericGeronimoServerBehaviour;
import org.apache.geronimo.st.core.GeronimoConnectionFactory;
@@ -44,6 +46,7 @@
import org.apache.geronimo.st.core.commands.DeploymentCommandFactory;
import org.apache.geronimo.st.core.commands.IDeploymentCommand;
import org.apache.geronimo.st.core.commands.TargetModuleIdNotFoundException;
+import org.apache.geronimo.st.v11.core.internal.EclipseAwareConfigurationStore;
import org.apache.geronimo.st.v11.core.internal.Messages;
import org.apache.geronimo.st.v11.core.internal.Trace;
import org.apache.geronimo.system.jmx.KernelDelegate;
@@ -135,6 +138,19 @@
return kernel;
}
+
+ public void installRepo() {
+ try {
+ AbstractName abstractName = kernel.getNaming().createRootName(new Artifact("eclipse", "eclipse", "1.0", "car"), "EclipseConfigStore", "ConfigurationStore");
+ GBeanData mockGBean = new GBeanData(abstractName, EclipseAwareConfigurationStore.getGBeanInfo());
+ AbstractNameQuery query = new AbstractNameQuery("geronimo/rmi-naming/1.1-SNAPSHOT/car");
+ mockGBean.addDependency(query);
+ kernel.loadGBean(mockGBean, getKernel().getClass().getClassLoader());
+ kernel.startGBean(mockGBean.getAbstractName());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
public boolean isKernelAlive() {
try {
@@ -184,6 +200,8 @@
*/
public void publishModule(int kind, int deltaKind, IModule[] module,
IProgressMonitor monitor) throws CoreException {
+
+ //installRepo();
Trace.trace(Trace.INFO, ">> publishModule(), deltaKind = " + deltaKind);
Trace.trace(Trace.INFO, Arrays.asList(module).toString());