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/08/30 18:51:59 UTC
svn commit: r438540 [1/3] - in /geronimo/server/branches/sachin: ./
modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/
modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/
modules/geronimo-client-buil...
Author: sppatel
Date: Wed Aug 30 09:51:57 2006
New Revision: 438540
URL: http://svn.apache.org/viewvc?rev=438540&view=rev
Log:
add new synced branch
Added:
geronimo/server/branches/sachin/
- copied from r438537, geronimo/server/trunk/
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java (with props)
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java (with props)
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java (with props)
Modified:
geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java
geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
geronimo/server/branches/sachin/modules/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ConfigurationBuilder.java
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/SingleFileHotDeployer.java
geronimo/server/branches/sachin/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/UnavailableModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/UnavailableWebServiceBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebServiceBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
geronimo/server/branches/sachin/modules/geronimo-jetty-builder/src/main/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
geronimo/server/branches/sachin/modules/geronimo-jetty-builder/src/test/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
geronimo/server/branches/sachin/modules/geronimo-jetty-builder/src/test/java/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
geronimo/server/branches/sachin/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
geronimo/server/branches/sachin/modules/geronimo-service-builder/src/test/java/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
geronimo/server/branches/sachin/modules/geronimo-web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Modified: geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java Wed Aug 30 09:51:57 2006
@@ -58,6 +58,7 @@
import org.apache.geronimo.axis.server.ServiceInfo;
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.DeployableModule;
import org.apache.geronimo.gbean.GBeanData;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -84,11 +85,11 @@
//WebServiceBuilder
- public Map parseWebServiceDescriptor(URL wsDDUrl, JarFile moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException {
- return WSDescriptorParser.parseWebServiceDescriptor(wsDDUrl, moduleFile, isEJB, servletLocations);
+ public Map parseWebServiceDescriptor(URL wsDDUrl, DeployableModule deployableModule, boolean isEJB, Map servletLocations) throws DeploymentException {
+ return WSDescriptorParser.parseWebServiceDescriptor(wsDDUrl, deployableModule, isEJB, servletLocations);
}
- public void configurePOJO(GBeanData targetGBean, JarFile moduleFile, Object portInfoObject, String seiClassName, ClassLoader classLoader) throws DeploymentException {
+ public void configurePOJO(GBeanData targetGBean, DeployableModule deployableModule, Object portInfoObject, String seiClassName, ClassLoader classLoader) throws DeploymentException {
PortInfo portInfo = (PortInfo) portInfoObject;
ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
JavaServiceDesc serviceDesc = serviceInfo.getServiceDesc();
@@ -127,7 +128,7 @@
targetGBean.setAttribute("webServiceContainer", axisWebServiceContainer);
}
- public void configureEJB(GBeanData targetGBean, JarFile moduleFile, Object portInfoObject, ClassLoader classLoader) throws DeploymentException {
+ public void configureEJB(GBeanData targetGBean, DeployableModule deployableModule, Object portInfoObject, ClassLoader classLoader) throws DeploymentException {
PortInfo portInfo = (PortInfo) portInfoObject;
ServiceInfo serviceInfo = AxisServiceBuilder.createServiceInfo(portInfo, classLoader);
targetGBean.setAttribute("serviceInfo", serviceInfo);
@@ -147,13 +148,13 @@
//ServicereferenceBuilder
public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) throws DeploymentException {
GerServiceRefType gerServiceRefType = (GerServiceRefType) serviceRefType;
- JarFile moduleFile = module.getModuleFile();
+ DeployableModule deployableModule = module.getModuleFile();
SchemaInfoBuilder schemaInfoBuilder = null;
JavaWsdlMappingType mapping = null;
if (wsdlURI != null) {
- schemaInfoBuilder = new SchemaInfoBuilder(moduleFile, wsdlURI);
+ schemaInfoBuilder = new SchemaInfoBuilder(deployableModule, wsdlURI);
- mapping = WSDescriptorParser.readJaxrpcMapping(moduleFile, jaxrpcMappingURI);
+ mapping = WSDescriptorParser.readJaxrpcMapping(deployableModule, jaxrpcMappingURI);
}
return createService(serviceInterface, schemaInfoBuilder, mapping, serviceQName, SOAP_VERSION, handlerInfos, gerServiceRefType, deploymentContext, module, classLoader);
Modified: geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/SchemaInfoBuilder.java Wed Aug 30 09:51:57 2006
@@ -18,8 +18,10 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.FileInputStream;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -54,6 +56,8 @@
import org.apache.geronimo.xbeans.wsdl.TPort;
import org.apache.geronimo.xbeans.wsdl.TService;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.DeployableModule;
+import org.apache.geronimo.deployment.DefaultDeployableModule;
import org.apache.xmlbeans.SchemaField;
import org.apache.xmlbeans.SchemaGlobalElement;
import org.apache.xmlbeans.SchemaParticle;
@@ -112,7 +116,7 @@
}
}
- private final JarFile moduleFile;
+ private final DeployableModule deployableModule;
private final Definition definition;
private final Stack uris = new Stack();
private final Map wsdlMap = new HashMap();
@@ -123,24 +127,24 @@
private final Map portMap;
- public SchemaInfoBuilder(JarFile moduleFile, URI wsdlUri) throws DeploymentException {
- this(moduleFile, wsdlUri, null, null);
+ public SchemaInfoBuilder(DeployableModule deployableModule, URI wsdlUri) throws DeploymentException {
+ this(deployableModule, wsdlUri, null, null);
}
- public SchemaInfoBuilder(JarFile moduleFile, Definition definition) throws DeploymentException {
- this(moduleFile, null, definition, null);
+ public SchemaInfoBuilder(DeployableModule deployableModule, Definition definition) throws DeploymentException {
+ this(deployableModule, null, definition, null);
}
- SchemaInfoBuilder(JarFile moduleFile, URI uri, SchemaTypeSystem schemaTypeSystem) throws DeploymentException {
- this(moduleFile, uri, null, schemaTypeSystem);
+ SchemaInfoBuilder(DeployableModule deployableModule, URI uri, SchemaTypeSystem schemaTypeSystem) throws DeploymentException {
+ this(deployableModule, uri, null, schemaTypeSystem);
}
- SchemaInfoBuilder(JarFile moduleFile, URI uri, Definition definition, SchemaTypeSystem schemaTypeSystem) throws DeploymentException {
- this.moduleFile = moduleFile;
+ SchemaInfoBuilder(DeployableModule deployableModle, URI uri, Definition definition, SchemaTypeSystem schemaTypeSystem) throws DeploymentException {
+ this.deployableModule = deployableModle;
if (uri != null) {
uris.push(uri);
if (definition == null && schemaTypeSystem == null) {
- definition = readWsdl(moduleFile, uri);
+ definition = readWsdl(deployableModle, uri);
}
} else if (definition != null) {
try {
@@ -513,7 +517,7 @@
}
- public Definition readWsdl(JarFile moduleFile, URI wsdlURI) throws DeploymentException {
+ public Definition readWsdl(DeployableModule deployableModule, URI wsdlURI) throws DeploymentException {
Definition definition;
WSDLFactory wsdlFactory = null;
try {
@@ -607,6 +611,19 @@
throw new DeploymentException("No port found with name " + portComponentName + " expected at " + servletLocation);
}
+ private InputStream getInputStream(URI location, DeployableModule module) throws IOException {
+ InputStream inputStream = null;
+ if (deployableModule instanceof DefaultDeployableModule) {
+ JarFile jar = ((DefaultDeployableModule) deployableModule).getJarFile();
+ ZipEntry entry = jar.getEntry(location.toString());
+ inputStream = jar.getInputStream(entry);
+ } else {
+ URL url = deployableModule.resolve(location.toString());
+ inputStream = new FileInputStream(url.getFile());
+ }
+ return inputStream;
+ }
+
private class JarEntityResolver implements EntityResolver {
private final static String PROJECT_URL_PREFIX = "project://local/";
@@ -619,12 +636,11 @@
URI location = ((URI) uris.peek()).resolve(systemId);
InputStream wsdlInputStream = null;
try {
- ZipEntry entry = moduleFile.getEntry(location.toString());
- wsdlInputStream = moduleFile.getInputStream(entry);
+ wsdlInputStream = getInputStream(location, deployableModule);
XmlObject xmlObject = SchemaDocument.Factory.parse(wsdlInputStream);
wsdlMap.put(location, xmlObject);
wsdlInputStream.close();
- wsdlInputStream = moduleFile.getInputStream(entry);
+ wsdlInputStream = getInputStream(location, deployableModule);
} catch (XmlException e) {
throw (IOException) new IOException("Could not parse schema document").initCause(e);
}
@@ -644,12 +660,11 @@
public InputSource getBaseInputSource() {
InputStream wsdlInputStream = null;
try {
- ZipEntry entry = moduleFile.getEntry(wsdlURI.toString());
- wsdlInputStream = moduleFile.getInputStream(entry);
+ wsdlInputStream = getInputStream(wsdlURI, deployableModule);
DefinitionsDocument definition = DefinitionsDocument.Factory.parse(wsdlInputStream);
wsdlMap.put(wsdlURI, definition);
wsdlInputStream.close();
- wsdlInputStream = moduleFile.getInputStream(entry);
+ wsdlInputStream = getInputStream(wsdlURI, deployableModule);
} catch (Exception e) {
throw new RuntimeException("Could not open stream to wsdl file", e);
}
@@ -665,8 +680,7 @@
latestImportURI = parentURI.resolve(relativeLocation);
InputStream importInputStream = null;
try {
- ZipEntry entry = moduleFile.getEntry(latestImportURI.toString());
- importInputStream = moduleFile.getInputStream(entry);
+ importInputStream = getInputStream(latestImportURI, deployableModule);
try {
DefinitionsDocument definition = DefinitionsDocument.Factory.parse(importInputStream);
importInputStream.close();
@@ -675,7 +689,7 @@
} catch (XmlException e) {
//probably was a schema rather than wsdl. If there are real problems they will show up later.
}
- importInputStream = moduleFile.getInputStream(entry);
+ importInputStream = getInputStream(latestImportURI, deployableModule);
} catch (Exception e) {
throw new RuntimeException("Could not open stream to import file", e);
}
Modified: geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/WSDescriptorParser.java Wed Aug 30 09:51:57 2006
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.FileInputStream;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.math.BigInteger;
@@ -76,6 +77,8 @@
import org.apache.geronimo.xbeans.j2ee.WebservicesType;
import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.DeployableModule;
+import org.apache.geronimo.deployment.DefaultDeployableModule;
import org.apache.xmlbeans.XmlException;
/**
@@ -84,20 +87,37 @@
public class WSDescriptorParser {
- public static JavaWsdlMappingType readJaxrpcMapping(JarFile moduleFile, URI jaxrpcMappingURI) throws DeploymentException {
+ public static JavaWsdlMappingType readJaxrpcMapping(DeployableModule deployableModule, URI jaxrpcMappingURI) throws DeploymentException {
String jaxrpcMappingPath = jaxrpcMappingURI.toString();
- return readJaxrpcMapping(moduleFile, jaxrpcMappingPath);
+ return readJaxrpcMapping(deployableModule, jaxrpcMappingPath);
}
- public static JavaWsdlMappingType readJaxrpcMapping(JarFile moduleFile, String jaxrpcMappingPath) throws DeploymentException {
+ private static InputStream getInputStream(String path, DeployableModule module) throws IOException {
+ InputStream inputStream = null;
+ if (module instanceof DefaultDeployableModule) {
+ JarFile jar = ((DefaultDeployableModule) module).getJarFile();
+ ZipEntry entry = jar.getEntry(path);
+ if (entry == null)
+ return null;
+ inputStream = jar.getInputStream(entry);
+ } else {
+ URL url = module.resolve(path);
+ if (url == null)
+ return null;
+ inputStream = new FileInputStream(url.getFile());
+ }
+ return inputStream;
+ }
+
+ public static JavaWsdlMappingType readJaxrpcMapping(DeployableModule deployableModule, String jaxrpcMappingPath) throws DeploymentException {
JavaWsdlMappingType mapping;
InputStream jaxrpcInputStream = null;
try {
- ZipEntry zipEntry = moduleFile.getEntry(jaxrpcMappingPath);
- if(zipEntry == null){
- throw new DeploymentException("The JAX-RPC mapping file "+jaxrpcMappingPath+" specified in webservices.xml for the ejb module could not be found.");
+ jaxrpcInputStream = getInputStream(jaxrpcMappingPath, deployableModule);
+ if (jaxrpcInputStream == null) {
+ throw new DeploymentException("The JAX-RPC mapping file " + jaxrpcMappingPath + " specified in webservices.xml for the ejb module could not be found.");
}
- jaxrpcInputStream = moduleFile.getInputStream(zipEntry);
+ jaxrpcInputStream = getInputStream(jaxrpcMappingPath, deployableModule);
} catch (IOException e) {
throw new DeploymentException("Could not open stream to jaxrpc mapping document", e);
}
@@ -291,13 +311,13 @@
* corresponding ejb-link or servlet-link element .
*
* @param webservicesType
- * @param moduleFile
+ * @param deployableModule
* @param isEJB
* @param servletLocations
* @return
* @throws org.apache.geronimo.common.DeploymentException
*/
- public static Map parseWebServiceDescriptor(WebservicesType webservicesType, JarFile moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException {
+ public static Map parseWebServiceDescriptor(WebservicesType webservicesType, DeployableModule deployableModule, boolean isEJB, Map servletLocations) throws DeploymentException {
Map portMap = new HashMap();
WebserviceDescriptionType[] webserviceDescriptions = webservicesType.getWebserviceDescriptionArray();
for (int i = 0; i < webserviceDescriptions.length; i++) {
@@ -314,10 +334,10 @@
} catch (URISyntaxException e) {
throw new DeploymentException("Could not construct jaxrpc mapping uri from " + webserviceDescription.getJaxrpcMappingFile(), e);
}
- SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(moduleFile, wsdlURI);
+ SchemaInfoBuilder schemaInfoBuilder = new SchemaInfoBuilder(deployableModule, wsdlURI);
Map wsdlPortMap = schemaInfoBuilder.getPortMap();
- JavaWsdlMappingType javaWsdlMapping = readJaxrpcMapping(moduleFile, jaxrpcMappingURI);
+ JavaWsdlMappingType javaWsdlMapping = readJaxrpcMapping(deployableModule, jaxrpcMappingURI);
HashMap seiMappings = new HashMap();
ServiceEndpointInterfaceMappingType[] mappings = javaWsdlMapping.getServiceEndpointInterfaceMappingArray();
for (int j = 0; j < mappings.length; j++) {
@@ -376,12 +396,12 @@
return portMap;
}
- public static Map parseWebServiceDescriptor(URL wsDDUrl, JarFile moduleFile, boolean isEJB, Map servletLocations) throws DeploymentException {
+ public static Map parseWebServiceDescriptor(URL wsDDUrl, DeployableModule deployableModule, boolean isEJB, Map servletLocations) throws DeploymentException {
try {
WebservicesDocument webservicesDocument = WebservicesDocument.Factory.parse(wsDDUrl);
XmlBeansUtil.validateDD(webservicesDocument);
WebservicesType webservicesType = webservicesDocument.getWebservices();
- return parseWebServiceDescriptor(webservicesType, moduleFile, isEJB, servletLocations);
+ return parseWebServiceDescriptor(webservicesType, deployableModule, isEJB, servletLocations);
} catch (XmlException e) {
throw new DeploymentException("Could not read descriptor document", e);
} catch (IOException e) {
Modified: geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-axis-builder/src/test/java/org/apache/geronimo/axis/builder/ServiceReferenceTest.java Wed Aug 30 09:51:57 2006
@@ -24,6 +24,7 @@
import java.util.Collections;
import java.util.List;
import java.util.Map;
+import java.util.jar.JarFile;
import javax.wsdl.Binding;
import javax.wsdl.BindingInput;
import javax.wsdl.BindingOperation;
@@ -61,6 +62,8 @@
import org.apache.geronimo.axis.client.AxisServiceReference;
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.DeployableModule;
+import org.apache.geronimo.deployment.DeployableModuleFactory;
import org.apache.geronimo.deployment.util.UnpackedJarFile;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.j2ee.deployment.EJBModule;
@@ -118,7 +121,9 @@
File moduleLocation = new File(tmpbasedir, "ejb");
moduleLocation.mkdirs();
- module = new EJBModule(true, moduleName, environment, new UnpackedJarFile(moduleLocation), "ejb", null, null, null);
+ JarFile unpackedJar = new UnpackedJarFile(moduleLocation);
+ DeployableModule dm = DeployableModuleFactory.createDeployableModule(unpackedJar);
+ module = new EJBModule(true, moduleName, environment, dm, "ejb", null, null, null);
runExternalWSTest = System.getProperty("geronimo.run.external.webservicetest", "false").equals("true");
}
Modified: geronimo/server/branches/sachin/modules/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-client-builder/src/main/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java Wed Aug 30 09:51:57 2006
@@ -38,16 +38,11 @@
import org.apache.geronimo.client.AppClientContainer;
import org.apache.geronimo.client.StaticJndiContextPlugin;
import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.ModuleIDBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
+import org.apache.geronimo.deployment.*;
import org.apache.geronimo.deployment.service.EnvironmentBuilder;
-import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.deployment.util.NestedJarFile;
import org.apache.geronimo.deployment.xbeans.EnvironmentType;
-import org.apache.geronimo.deployment.xbeans.GbeanType;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -203,15 +198,15 @@
return (SecurityBuilder) securityBuilder.getElement();
}
- public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ public Module createModule(File plan, DeployableModule moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
return createModule(plan, moduleFile, "app-client", null, null, null, naming, idBuilder);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ public Module createModule(Object plan, DeployableModule moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
return createModule(plan, moduleFile, targetPath, specDDUrl, environment, earName, naming, idBuilder);
}
- private Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment earEnvironment, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ private Module createModule(Object plan, DeployableModule moduleFile, String targetPath, URL specDDUrl, Environment earEnvironment, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
assert moduleFile != null: "moduleFile is null";
assert targetPath != null: "targetPath is null";
assert !targetPath.endsWith("/"): "targetPath must not end with a '/'";
@@ -221,7 +216,7 @@
ApplicationClientType appClient;
try {
if (specDDUrl == null) {
- specDDUrl = DeploymentUtil.createJarURL(moduleFile, "META-INF/application-client.xml");
+ specDDUrl = moduleFile.resolve("META-INF/application-client.xml");
}
// read in the entire specDD as a string, we need this for getDeploymentDescriptor
@@ -248,12 +243,12 @@
EnvironmentType clientEnvironmentType = gerAppClient.getClientEnvironment();
Environment clientEnvironment = EnvironmentBuilder.buildEnvironment(clientEnvironmentType, defaultClientEnvironment);
+ String name = moduleFile.getRoot().getName();
if(standAlone) {
- String name = new File(moduleFile.getName()).getName();
idBuilder.resolve(clientEnvironment, name+"_"+name, "jar");
} else {
Artifact earConfigId = earEnvironment.getConfigId();
- idBuilder.resolve(clientEnvironment, earConfigId.getArtifactId() + "_" + new File(moduleFile.getName()).getName(), "jar");
+ idBuilder.resolve(clientEnvironment, earConfigId.getArtifactId() + "_" + name, "jar");
}
EnvironmentType serverEnvironmentType = gerAppClient.getServerEnvironment();
Environment serverEnvironment = EnvironmentBuilder.buildEnvironment(serverEnvironmentType, defaultServerEnvironment);
@@ -264,7 +259,7 @@
throw new IllegalStateException("Server environment module ID should be fully resolved (not "+serverEnvironment.getConfigId()+")");
}
} else {
- idBuilder.resolve(serverEnvironment, new File(moduleFile.getName()).getName(), "jar");
+ idBuilder.resolve(serverEnvironment, name, "jar");
}
AbstractName moduleName;
@@ -278,7 +273,7 @@
return new AppClientModule(standAlone, moduleName, serverEnvironment, clientEnvironment, moduleFile, targetPath, appClient, gerAppClient, specDD);
}
- GerApplicationClientType getGeronimoAppClient(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, ApplicationClientType appClient, Environment environment) throws DeploymentException {
+ GerApplicationClientType getGeronimoAppClient(Object plan, DeployableModule moduleFile, boolean standAlone, String targetPath, ApplicationClientType appClient, Environment environment) throws DeploymentException {
GerApplicationClientType gerAppClient;
XmlObject rawPlan = null;
try {
@@ -290,7 +285,7 @@
if (plan != null) {
rawPlan = XmlBeansUtil.parse((File) plan);
} else {
- URL path = DeploymentUtil.createJarURL(moduleFile, "META-INF/geronimo-application-client.xml");
+ URL path = moduleFile.resolve("META-INF/geronimo-application-client.xml");
rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
}
}
@@ -305,7 +300,7 @@
String path;
if (standAlone) {
// default configId is based on the moduleFile name
- path = new File(moduleFile.getName()).getName();
+ path = moduleFile.getRoot().getName();
} else {
// default configId is based on the module uri from the application.xml
path = targetPath;
@@ -346,7 +341,7 @@
return geronimoAppClient;
}
- public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repositories) throws DeploymentException {
+ public void installModule(DeployableModule earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repositories) throws DeploymentException {
// extract the app client jar file into a standalone packed jar file and add the contents to the output
JarFile moduleFile = module.getModuleFile();
try {
@@ -355,7 +350,7 @@
throw new DeploymentException("Unable to copy app client module jar into configuration: " + moduleFile.getName());
}
AppClientModule appClientModule = (AppClientModule) module;
- appClientModule.setEarFile(earFile);
+ appClientModule.setEar(earFile);
//create the ear context for the app client.
Environment clientEnvironment = appClientModule.getClientEnvironment();
if (!appClientModule.isStandAlone() || clientEnvironment.getConfigId() == null) {
@@ -474,7 +469,7 @@
}
// add manifest class path entries to the app client context
- addManifestClassPath(appClientDeploymentContext, appClientModule.getEarFile(), moduleFile, moduleBase);
+ addManifestClassPath(appClientDeploymentContext, appClientModule.getEar(), moduleFile, moduleBase);
// get the classloader
ClassLoader appClientClassLoader = appClientDeploymentContext.getClassLoader();
@@ -512,7 +507,7 @@
} else {
path = resource.getInternalRar();
try {
- connectorFile = new NestedJarFile(appClientModule.getEarFile(), path);
+ connectorFile = new NestedJarFile(appClientModule.getEar(), path);
} catch (IOException e) {
throw new DeploymentException("Could not locate connector inside ear", e);
}
@@ -619,7 +614,7 @@
return GERAPPCLIENT_NAMESPACE;
}
- public void addManifestClassPath(DeploymentContext deploymentContext, JarFile earFile, JarFile jarFile, URI jarFileLocation) throws DeploymentException {
+ public void addManifestClassPath(DeploymentContext deploymentContext, DeployableModule earFile, DeployableModule jarFile, URI jarFileLocation) throws DeploymentException {
Manifest manifest;
try {
manifest = jarFile.getManifest();
Modified: geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Wed Aug 30 09:51:57 2006
@@ -61,9 +61,7 @@
import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionLog;
import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
import org.apache.geronimo.connector.outbound.connectionmanagerconfig.XATransactions;
-import org.apache.geronimo.deployment.ModuleIDBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
+import org.apache.geronimo.deployment.*;
import org.apache.geronimo.deployment.service.EnvironmentBuilder;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.deployment.xbeans.EnvironmentType;
@@ -153,15 +151,15 @@
this.serviceBuilders = new NamespaceDrivenBuilderCollection(serviceBuilders);
}
- public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ public Module createModule(File plan, DeployableModule moduleFile, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
return createModule(plan, moduleFile, "rar", null, null, null, naming, idBuilder);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ public Module createModule(Object plan, DeployableModule moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
return createModule(plan, moduleFile, targetPath, specDDUrl, environment, earName, naming, idBuilder);
}
- private Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment earEnvironment, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
+ private Module createModule(Object plan, DeployableModule moduleFile, String targetPath, URL specDDUrl, Environment earEnvironment, AbstractName earName, Naming naming, ModuleIDBuilder idBuilder) throws DeploymentException {
assert moduleFile != null: "moduleFile is null";
assert targetPath != null: "targetPath is null";
assert !targetPath.endsWith("/"): "targetPath must not end with a '/'";
@@ -170,7 +168,7 @@
XmlObject connector;
try {
if (specDDUrl == null) {
- specDDUrl = DeploymentUtil.createJarURL(moduleFile, "META-INF/ra.xml");
+ specDDUrl = moduleFile.resolve("META-INF/ra.xml");
}
// read in the entire specDD as a string, we need this for getDeploymentDescriptor
@@ -203,7 +201,7 @@
if (plan != null) {
gerConnectorDoc = GerConnectorDocument.Factory.parse((File) plan, XmlBeansUtil.createXmlOptions(errors));
} else {
- URL path = DeploymentUtil.createJarURL(moduleFile, "META-INF/geronimo-ra.xml");
+ URL path = moduleFile.resolve("META-INF/geronimo-ra.xml");
gerConnectorDoc = GerConnectorDocument.Factory.parse(path, XmlBeansUtil.createXmlOptions(errors));
}
if (errors.size() > 0) {
@@ -244,7 +242,7 @@
throw new IllegalStateException("Connector module ID should be fully resolved (not " + environment.getConfigId() + ")");
}
} else {
- idBuilder.resolve(environment, new File(moduleFile.getName()).getName(), "rar");
+ idBuilder.resolve(environment, moduleFile.getRoot().getName(), "rar");
}
AbstractName moduleName;
@@ -259,30 +257,32 @@
return new ConnectorModule(standAlone, moduleName, environment, moduleFile, targetPath, connector, gerConnector, specDD);
}
- public void installModule(JarFile earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {
+ public void installModule(DeployableModule earFile, EARContext earContext, Module module, Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws DeploymentException {
try {
- JarFile moduleFile = module.getModuleFile();
-
- // add the manifest classpath entries declared in the connector to the class loader
- // we have to explicitly add these since we are unpacking the connector module
- // and the url class loader will not pick up a manifiest from an unpacked dir
- // N.B. If we ever introduce a separate configuration/module for a rar inside an ear
- // this will need to be modified to use "../" instead of module.getTargetPath().
- // See AbstractWebModuleBuilder.
- earContext.addManifestClassPath(moduleFile, URI.create(module.getTargetPath()));
-
- URI targetURI = URI.create(module.getTargetPath() + "/");
- Enumeration entries = moduleFile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry entry = (ZipEntry) entries.nextElement();
- URI target = targetURI.resolve(entry.getName());
- if (entry.getName().endsWith(".jar")) {
- earContext.addInclude(target, moduleFile, entry);
- } else {
- earContext.addFile(target, moduleFile, entry);
+ DeployableModule moduleFile = module.getModuleFile();
+ if (moduleFile instanceof DefaultDeployableModule) {
+ JarFile jar = ((DefaultDeployableModule) moduleFile).getJarFile();
+ // add the manifest classpath entries declared in the connector to the class loader
+ // we have to explicitly add these since we are unpacking the connector module
+ // and the url class loader will not pick up a manifiest from an unpacked dir
+ // N.B. If we ever introduce a separate configuration/module for a rar inside an ear
+ // this will need to be modified to use "../" instead of module.getTargetPath().
+ // See AbstractWebModuleBuilder.
+ earContext.addManifestClassPath(jar, URI.create(module.getTargetPath()));
+ URI targetURI = URI.create(module.getTargetPath() + "/");
+ Enumeration entries = jar.entries();
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = (ZipEntry) entries.nextElement();
+ URI target = targetURI.resolve(entry.getName());
+ if (entry.getName().endsWith(".jar")) {
+ earContext.addInclude(target, jar, entry);
+ } else {
+ earContext.addFile(target, jar, entry);
+ }
}
+ } else {
+ //TODO GERONIMO-1526
}
-
} catch (IOException e) {
throw new DeploymentException("Problem deploying connector", e);
}
Modified: geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-connector-builder/src/test/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java Wed Aug 30 09:51:57 2006
@@ -43,6 +43,8 @@
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.DeploymentContext;
import org.apache.geronimo.deployment.ModuleIDBuilder;
+import org.apache.geronimo.deployment.DeployableModule;
+import org.apache.geronimo.deployment.DeployableModuleFactory;
import org.apache.geronimo.deployment.service.GBeanBuilder;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.gbean.AbstractName;
@@ -166,6 +168,7 @@
JarFile rarFile = null;
try {
rarFile = DeploymentUtil.createJarFile(new File(BASEDIR, "target/test-ear-noger.ear"));
+ DeployableModule rarModule = DeployableModuleFactory.createDeployableModule(rarFile);
GBeanBuilder serviceBuilder = new GBeanBuilder(null, null);
// EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment, transactionContextManagerName, connectionTrackerName, null, null, null, new AbstractNameQuery(serverName, J2EEServerImpl.GBEAN_INFO.getInterfaces()), null, null, ejbReferenceBuilder, null,
EARConfigBuilder configBuilder = new EARConfigBuilder(defaultEnvironment,
@@ -194,8 +197,8 @@
try {
File planFile = new File(BASEDIR, "src/test/data/data/external-application-plan.xml");
ModuleIDBuilder idBuilder = new ModuleIDBuilder();
- Object plan = configBuilder.getDeploymentPlan(planFile, rarFile, idBuilder);
- context = configBuilder.buildConfiguration(false, configBuilder.getConfigurationID(plan, rarFile, idBuilder), plan, rarFile, Collections.singleton(configurationStore), artifactResolver, configurationStore);
+ Object plan = configBuilder.getDeploymentPlan(planFile, rarModule, idBuilder);
+ context = configBuilder.buildConfiguration(false, configBuilder.getConfigurationID(plan, rarModule, idBuilder), plan, rarModule, Collections.singleton(configurationStore), artifactResolver, configurationStore);
// add the a j2ee server so the application context reference can be resolved
context.addGBean("geronimo", J2EEServerImpl.GBEAN_INFO);
@@ -367,9 +370,10 @@
Thread.currentThread().setContextClassLoader(cl);
JarFile rarJarFile = DeploymentUtil.createJarFile(rarFile);
+ DeployableModule rarModule = DeployableModuleFactory.createDeployableModule(rarJarFile);
AbstractName earName = null;
String moduleName = "geronimo/test-ear/1.0/car";
- Module module = moduleBuilder.createModule(action.getVendorDD(), rarJarFile, moduleName, action.getSpecDD(), null, null, earName, naming, new ModuleIDBuilder());
+ Module module = moduleBuilder.createModule(action.getVendorDD(), rarModule, moduleName, action.getSpecDD(), null, null, earName, naming, new ModuleIDBuilder());
if (module == null) {
throw new DeploymentException("Was not a connector module");
}
@@ -427,7 +431,7 @@
for (Iterator iterator = gb.iterator(); iterator.hasNext();) {
AbstractName name = (AbstractName) iterator.next();
if (State.RUNNING_INDEX != kernel.getGBeanState(name)) {
- log.debug("Not running: " + name);
+ System.out.println("Not running: " + name);
}
}
Modified: geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/CommandContext.java Wed Aug 30 09:51:57 2006
@@ -27,6 +27,8 @@
private String password;
private boolean inPlace;
+ private String deployableModuleImplClass;
+
public CommandContext(boolean logErrors,
boolean verbose,
String username,
@@ -85,5 +87,13 @@
public void setInPlace(boolean inPlace) {
this.inPlace = inPlace;
+ }
+
+ public String getDeployableModuleImplClass() {
+ return deployableModuleImplClass;
+ }
+
+ public void setDeployableModuleImplClass(String deployableModuleImplClass) {
+ this.deployableModuleImplClass = deployableModuleImplClass;
}
}
Modified: geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java Wed Aug 30 09:51:57 2006
@@ -50,16 +50,12 @@
import org.apache.geronimo.kernel.config.NoSuchStoreException;
import org.apache.geronimo.kernel.management.State;
import org.apache.geronimo.web.deployment.WARConfigurer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* @version $Rev$ $Date$
*/
public abstract class JMXDeploymentManager implements DeploymentManager {
- private static final Log log = LogFactory.getLog(JMXDeploymentManager.class);
-
protected Kernel kernel;
private ConfigurationManager configurationManager;
private CommandContext commandContext;
@@ -244,6 +240,14 @@
return command;
}
+ public void setModuleConfigurationClass(String className) {
+ commandContext.setDeployableModuleImplClass(className);
+ }
+
+ public String getModuleConfigurationClass() {
+ return commandContext.getDeployableModuleImplClass();
+ }
+
public Locale[] getSupportedLocales() {
return new Locale[]{getDefaultLocale()};
}
@@ -288,7 +292,8 @@
Class cls = Class.forName("org.openejb.deployment.EJBConfigurer");
return (DeploymentConfiguration)cls.getMethod("createConfiguration", new Class[]{DeployableObject.class}).invoke(cls.newInstance(), new Object[]{dObj});
} catch (Exception e) {
- log.error("Unable to invoke EJB deployer", e);
+ System.err.println("Unable to invoke EJB deployer");
+ e.printStackTrace();
}
} else if(dObj.getType().equals(ModuleType.RAR)) {
return new RARConfigurer().createConfiguration(dObj);
@@ -318,7 +323,7 @@
commandContext.setLogErrors(shouldLog);
commandContext.setVerbose(verboseStatus);
}
-
+
public void setInPlace(boolean inPlace) {
commandContext.setInPlace(inPlace);
}
Modified: geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/RemoteDeploymentManager.java Wed Aug 30 09:51:57 2006
@@ -53,8 +53,6 @@
import org.apache.geronimo.system.plugin.PluginInstaller;
import org.apache.geronimo.system.plugin.PluginRepositoryList;
import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
/**
* Connects to a Kernel in a remote VM (may or many not be on the same machine).
@@ -62,8 +60,6 @@
* @version $Rev$ $Date$
*/
public class RemoteDeploymentManager extends JMXDeploymentManager implements GeronimoDeploymentManager {
- private static final Log log = LogFactory.getLog(RemoteDeploymentManager.class);
-
private JMXConnector jmxConnector;
private boolean isSameMachine;
@@ -98,7 +94,7 @@
}
}
} catch (Exception e) {
- log.error("Unable to look up host name '"+hostname+"'; assuming it is a different machine, but this may not get very far.", e);
+ System.err.println("Unable to look up host name '"+hostname+"'; assuming it is a different machine, but this may not get very far. ("+e.getMessage()+")");
}
}
@@ -200,7 +196,7 @@
};
progress.addProgressListener(new ProgressListener() {
public void handleProgressEvent(ProgressEvent event) {
- log.info(event.getDeploymentStatus().getMessage());
+ System.out.println(event.getDeploymentStatus().getMessage());
}
});
RemoteDeployUtil.uploadFilesToServer(args, progress);
Modified: geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/AbstractDeployCommand.java Wed Aug 30 09:51:57 2006
@@ -30,7 +30,6 @@
import javax.enterprise.deploy.spi.Target;
import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.Deployer;
import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.gbean.AbstractNameQuery;
@@ -41,7 +40,7 @@
*/
public abstract class AbstractDeployCommand extends CommandSupport {
protected final Kernel kernel;
- private static final String[] DEPLOY_SIG = {boolean.class.getName(), File.class.getName(), File.class.getName(), String.class.getName()};
+ private static final String[] DEPLOY_SIG = {boolean.class.getName(), File.class.getName(), File.class.getName(), String.class.getName(), String.class.getName()};
protected final boolean spool;
protected File moduleArchive;
protected File deploymentPlan;
@@ -102,7 +101,7 @@
protected void doDeploy(Target target, boolean finished) throws Exception {
File[] args = {moduleArchive, deploymentPlan};
massageFileNames(args);
- Object deployParams[] = new Object[] {Boolean.valueOf(commandContext.isInPlace()), args[0], args[1], target.getName()};
+ Object deployParams[] = new Object[] {Boolean.valueOf(commandContext.isInPlace()), args[0], args[1], target.getName(), commandContext.getDeployableModuleImplClass()};
List objectNames = (List) kernel.invoke(deployer, "deploy", deployParams, DEPLOY_SIG);
if (objectNames == null || objectNames.isEmpty()) {
throw new DeploymentException("Server didn't deploy anything");
Modified: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ConfigurationBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ConfigurationBuilder.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ConfigurationBuilder.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/ConfigurationBuilder.java Wed Aug 30 09:51:57 2006
@@ -43,7 +43,7 @@
* @return the deployment plan, or null if this builder can not handle the module
* @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
*/
- Object getDeploymentPlan(File planFile, JarFile module, ModuleIDBuilder idBuilder) throws DeploymentException;
+ Object getDeploymentPlan(File planFile, DeployableModule module, ModuleIDBuilder idBuilder) throws DeploymentException;
/**
* Checks what configuration URL will be used for the provided module.
@@ -53,7 +53,7 @@
* @throws IOException if there was a problem reading or writing the files
* @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
*/
- Artifact getConfigurationID(Object plan, JarFile module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException;
+ Artifact getConfigurationID(Object plan, DeployableModule module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException;
/**
* Build a configuration from a local file
@@ -68,5 +68,5 @@
* @throws IOException if there was a problem reading or writing the files
* @throws org.apache.geronimo.common.DeploymentException if there was a problem with the configuration
*/
- DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile module, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException;
+ DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, DeployableModule module, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException;
}
Added: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java?rev=438540&view=auto
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java (added)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java Wed Aug 30 09:51:57 2006
@@ -0,0 +1,67 @@
+package org.apache.geronimo.deployment;
+
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.deployment.util.NestedJarFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.jar.JarFile;
+import java.net.URL;
+
+/**
+ * @version
+ */
+public class DefaultDeployableModule implements DeployableModule {
+
+ private String uri;
+ private File root;
+ private JarFile jarFile;
+
+ public DefaultDeployableModule(File root, JarFile jarFile) {
+ this.uri = uri;
+ this.root = root;
+ this.jarFile = jarFile;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+ public File getRoot() {
+ return root;
+ }
+
+ public File[] getModuleContextResources() {
+ return null;
+ }
+
+ public File[] getClassesFolders() {
+ return null;
+ }
+
+ public boolean isArchived() {
+ return root.isFile();
+ }
+
+ public DeployableModule[] getModules() {
+ return null;
+ }
+
+ public URL resolve(String path) throws IOException {
+ return DeploymentUtil.createJarURL(jarFile, path);
+ }
+
+ public DeployableModule resolveModule(String uri) throws IOException {
+ JarFile nestedJar = new NestedJarFile(jarFile, uri);
+ return DeployableModuleFactory.createDeployableModule(nestedJar);
+ }
+
+ public JarFile getJarFile() {
+ return jarFile;
+ }
+
+ public void cleanup() {
+ DeploymentUtil.close(jarFile);
+ }
+
+}
\ No newline at end of file
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DefaultDeployableModule.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java?rev=438540&view=auto
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java (added)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java Wed Aug 30 09:51:57 2006
@@ -0,0 +1,76 @@
+package org.apache.geronimo.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * @version
+ */
+public interface DeployableModule {
+
+ /**
+ * Returns the uri of the module, foo.ear, if a nested module then
+ * foo.ear/foo.war
+ *
+ * @return
+ */
+ String getURI();
+
+ /**
+ * Returns the root of the module, if isArchived then it return absolute
+ * location of the archive, otherwise the root folder of the module.
+ *
+ * @return
+ */
+ File getRoot();
+
+ /**
+ * Returns the root folders for the resources in this module that should be
+ * added to the module context. Returns an empty array if this is an
+ * archived module.
+ *
+ * @return a possibly-empty array of resource folders
+ */
+ File[] getModuleContextResources();
+
+ /**
+ * returns all the URLs that contain .class files, if isArchive then this
+ * would return an empty array
+ *
+ * @return
+ */
+ File[] getClassesFolders();
+
+ /**
+ * Returns true if this is an archived module. The archive can be a JarFile
+ * or an exploded archive.
+ *
+ * @return boolean
+ */
+ boolean isArchived();
+
+ /**
+ * Returns all the child modules for this module. For an ear module, this
+ * would return all of its contained j2ee modules and utility modules. For a
+ * web module, it would return its WEB-INF/lib entries.
+ *
+ * @return a possibly empty array of modules contained within this module
+ */
+ DeployableModule[] getModules();
+
+ /**
+ *
+ * @param path
+ * @return
+ */
+ URL resolve(String path) throws IOException;
+
+ DeployableModule resolveModule(String uri) throws IOException;
+
+ /**
+ * Peforms any cleanup on the instance, for a JarFile, would close it.
+ */
+ void cleanup();
+
+}
\ No newline at end of file
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModule.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java?rev=438540&view=auto
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java (added)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java Wed Aug 30 09:51:57 2006
@@ -0,0 +1,32 @@
+package org.apache.geronimo.deployment;
+
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.jar.JarFile;
+
+/**
+ * @version
+ */
+public class DeployableModuleFactory {
+
+ public static DeployableModule createDeployableModule(JarFile moduleFile) {
+ return new DefaultDeployableModule(null, moduleFile);
+ }
+
+ public static DeployableModule createDeployableModule(File moduleFile, String deployableModuleImplClass) throws DeploymentException {
+ if (deployableModuleImplClass == null) {
+ try {
+ JarFile jar = DeploymentUtil.createJarFile(moduleFile);
+ return new DefaultDeployableModule(moduleFile, jar);
+ } catch (IOException e) {
+ throw new DeploymentException("Cound not open module file: " + moduleFile.getAbsolutePath(), e);
+ }
+ } else {
+ //TODO
+ }
+ return null;
+ }
+}
\ No newline at end of file
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java
------------------------------------------------------------------------------
svn:keywords = Date Rev
Propchange: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/DeployableModuleFactory.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/Deployer.java Wed Aug 30 09:51:57 2006
@@ -30,7 +30,6 @@
import java.util.Properties;
import java.util.Set;
import java.util.jar.Attributes;
-import java.util.jar.JarFile;
import java.util.jar.Manifest;
import javax.management.ObjectName;
@@ -97,10 +96,14 @@
}
public List deploy(boolean inPlace, File moduleFile, File planFile) throws DeploymentException {
- return deploy(inPlace, moduleFile, planFile, null);
+ return deploy(inPlace, moduleFile, planFile, null, null);
}
public List deploy(boolean inPlace, File moduleFile, File planFile, String targetConfigStore) throws DeploymentException {
+ return deploy(inPlace, moduleFile, planFile, targetConfigStore, null);
+ }
+
+ public List deploy(boolean inPlace, File moduleFile, File planFile, String targetConfigStore, String deployableModuleImplClass) throws DeploymentException {
File originalModuleFile = moduleFile;
File tmpDir = null;
if (moduleFile != null && !moduleFile.isDirectory()) {
@@ -121,7 +124,7 @@
}
try {
- return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, null, null, null, targetConfigStore);
+ return deploy(inPlace, planFile, moduleFile, null, true, null, null, null, null, null, null, null, targetConfigStore, deployableModuleImplClass);
} catch (DeploymentException e) {
log.debug("Deployment failed: plan=" + planFile + ", module=" + originalModuleFile, e);
throw e.cleanse();
@@ -193,7 +196,8 @@
String mainGBean, String mainMethod, String manifestConfigurations, String classPath,
String endorsedDirs,
String extensionDirs,
- String targetConfigurationStore) throws DeploymentException {
+ String targetConfigurationStore,
+ String deployableModuleImplClass) throws DeploymentException {
if (planFile == null && moduleFile == null) {
throw new DeploymentException("No plan or module specified");
}
@@ -207,7 +211,7 @@
}
}
- JarFile module = null;
+ DeployableModule module = null;
if (moduleFile != null) {
if (inPlace && !moduleFile.isDirectory()) {
throw new DeploymentException("In place deployment is not allowed for packed module");
@@ -215,11 +219,7 @@
if (!moduleFile.exists()) {
throw new DeploymentException("Module file does not exist: " + moduleFile.getAbsolutePath());
}
- try {
- module = DeploymentUtil.createJarFile(moduleFile);
- } catch (IOException e) {
- throw new DeploymentException("Cound not open module file: " + moduleFile.getAbsolutePath(), e);
- }
+ module = DeployableModuleFactory.createDeployableModule(moduleFile, deployableModuleImplClass);
}
// File configurationDir = null;
@@ -384,7 +384,7 @@
}
throw new Error(e);
} finally {
- DeploymentUtil.close(module);
+ module.cleanup();
}
}
Modified: geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/SingleFileHotDeployer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/SingleFileHotDeployer.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/SingleFileHotDeployer.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/main/java/org/apache/geronimo/deployment/SingleFileHotDeployer.java Wed Aug 30 09:51:57 2006
@@ -24,7 +24,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.LinkedList;
-import java.util.jar.JarFile;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -120,13 +119,7 @@
}
ModuleIDBuilder idBuilder = new ModuleIDBuilder();
-
- JarFile module = null;
- try {
- module = DeploymentUtil.createJarFile(dir);
- } catch (IOException e) {
- throw new DeploymentException("Cound not open module file: " + dir.getAbsolutePath(), e);
- }
+ DeployableModule module = DeployableModuleFactory.createDeployableModule(dir, null);
try {
// get the builder and plan
@@ -180,7 +173,7 @@
} catch (Exception e) {
throw new DeploymentException("Unable to deploy " + dir, e);
} finally {
- DeploymentUtil.close(module);
+ module.cleanup();
}
}
@@ -220,7 +213,7 @@
return new Artifact(group, artifactId, version, type);
}
- private List deployConfiguration(ConfigurationBuilder builder, ConfigurationStore store, Artifact configurationId, Object plan, JarFile module, Collection stores, ArtifactResolver artifactResolver) throws DeploymentException {
+ private List deployConfiguration(ConfigurationBuilder builder, ConfigurationStore store, Artifact configurationId, Object plan, DeployableModule module, Collection stores, ArtifactResolver artifactResolver) throws DeploymentException {
try {
// It's our responsibility to close this context, once we're done with it...
DeploymentContext context = builder.buildConfiguration(true, configurationId, plan, module, stores, artifactResolver, store);
@@ -265,7 +258,7 @@
}
throw new Error(e);
} finally {
- DeploymentUtil.close(module);
+ module.cleanup();
}
}
Modified: geronimo/server/branches/sachin/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-deployment/src/test/java/org/apache/geronimo/deployment/SingleFileHotDeployerTest.java Wed Aug 30 09:51:57 2006
@@ -257,15 +257,15 @@
}
private class MockConfigurationBuilder implements ConfigurationBuilder {
- public Object getDeploymentPlan(File planFile, JarFile module, ModuleIDBuilder idBuilder) throws DeploymentException {
+ public Object getDeploymentPlan(File planFile, DeployableModule module, ModuleIDBuilder idBuilder) throws DeploymentException {
return new Object();
}
- public Artifact getConfigurationID(Object plan, JarFile module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException {
+ public Artifact getConfigurationID(Object plan, DeployableModule module, ModuleIDBuilder idBuilder) throws IOException, DeploymentException {
return NEW_ID;
}
- public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, JarFile module, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException {
+ public DeploymentContext buildConfiguration(boolean inPlaceDeployment, Artifact configId, Object plan, DeployableModule module, Collection configurationStores, ArtifactResolver artifactResolver, ConfigurationStore targetConfigurationStore) throws IOException, DeploymentException {
return new DeploymentContext(dir,
dir,
new Environment(configId),
Modified: geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java Wed Aug 30 09:51:57 2006
@@ -23,6 +23,7 @@
import java.util.jar.JarFile;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.DeployableModule;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.kernel.repository.Environment;
@@ -33,12 +34,12 @@
*/
public class AppClientModule extends Module {
private final Environment clientEnvironment;
- private JarFile earFile;
+ private DeployableModule ear;
private Collection resourceModules;
- public AppClientModule(boolean standAlone, AbstractName moduleName, Environment serverEnvironment, Environment clientEnvironment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
- super(standAlone, moduleName, serverEnvironment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+ public AppClientModule(boolean standAlone, AbstractName moduleName, Environment serverEnvironment, Environment clientEnvironment, DeployableModule deployableModule, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
+ super(standAlone, moduleName, serverEnvironment, deployableModule, targetPath, specDD, vendorDD, originalSpecDD, null);
this.clientEnvironment = clientEnvironment;
}
@@ -50,12 +51,12 @@
return clientEnvironment;
}
- public JarFile getEarFile() {
- return earFile;
+ public DeployableModule getEar() {
+ return ear;
}
- public void setEarFile(JarFile earFile) {
- this.earFile = earFile;
+ public void setEar(DeployableModule ear) {
+ this.ear = ear;
}
public void addClass(URI location, String fqcn, byte[] bytes, DeploymentContext context) throws IOException, URISyntaxException {
Modified: geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java?rev=438540&r1=438537&r2=438540&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java (original)
+++ geronimo/server/branches/sachin/modules/geronimo-j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java Wed Aug 30 09:51:57 2006
@@ -22,6 +22,7 @@
import java.util.jar.JarFile;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.DeployableModule;
import org.apache.geronimo.gbean.AbstractName;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.kernel.repository.Environment;
@@ -31,8 +32,8 @@
* @version $Rev$ $Date$
*/
public class ConnectorModule extends Module {
- public ConnectorModule(boolean standAlone, AbstractName moduleName, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
- super(standAlone, moduleName, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+ public ConnectorModule(boolean standAlone, AbstractName moduleName, Environment environment, DeployableModule deployableModule, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
+ super(standAlone, moduleName, environment, deployableModule, targetPath, specDD, vendorDD, originalSpecDD, null);
}
public ConfigurationModuleType getType() {