You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2006/02/08 04:00:07 UTC
svn commit: r375831 [2/3] - in /geronimo/branches/configid:
applications/console-standard/src/java/org/apache/geronimo/console/configmanager/
applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/
modules/axis-builde...
Modified: geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java (original)
+++ geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/Environment.java Tue Feb 7 18:59:48 2006
@@ -28,34 +28,27 @@
/**
* holds the data from the EnvironmentType xml while it is being resolved, transitively closed, etc.
+ *
* @version $Rev:$ $Date:$
*/
public class Environment {
private Artifact configId;
- private Map nameKeys = new HashMap();
+ private final Map nameKeys = new HashMap();
- private LinkedHashSet imports;
- private LinkedHashSet references;
- private LinkedHashSet dependencies;
- private LinkedHashSet includes;
+ private final LinkedHashSet imports = new LinkedHashSet();
+ private final LinkedHashSet references = new LinkedHashSet();
+ private final LinkedHashSet dependencies = new LinkedHashSet();
+ private final LinkedHashSet includes = new LinkedHashSet();
- private Set hiddenClasses;
- private Set nonOverrideableClasses;
+ private final Set hiddenClasses = new HashSet();
+ private final Set nonOverrideableClasses = new HashSet();
private boolean inverseClassloading;
+ private boolean suppressDefaultParentId;
- public Environment(Artifact configId, Map nameKeys, LinkedHashSet imports, LinkedHashSet references, LinkedHashSet dependencies, LinkedHashSet includes, Set hiddenClasses, Set nonOverrideableClasses, boolean inverseClassloading) {
- this.configId = configId;
- this.nameKeys = nameKeys;
- this.imports = imports;
- this.references = references;
- this.dependencies = dependencies;
- this.includes = includes;
- this.hiddenClasses = hiddenClasses;
- this.nonOverrideableClasses = nonOverrideableClasses;
- this.inverseClassloading = inverseClassloading;
+ public Environment() {
}
public Artifact getConfigId() {
@@ -70,56 +63,91 @@
return nameKeys;
}
+ public void addNameKeys(Map nameKeys) {
+ this.nameKeys.putAll(nameKeys);
+ }
+
public void setNameKeys(Map nameKeys) {
- this.nameKeys = nameKeys;
+ this.nameKeys.clear();
+ addNameKeys(nameKeys);
}
public LinkedHashSet getImports() {
return imports;
}
- public void setImports(LinkedHashSet imports) {
- this.imports = imports;
+ public void addImports(Collection imports) {
+ this.imports.addAll(imports);
+ }
+
+ public void setImports(Collection imports) {
+ this.imports.clear();
+ addImports(imports);
}
public LinkedHashSet getReferences() {
return references;
}
- public void setReferences(LinkedHashSet references) {
- this.references = references;
+ public void addReferences(Collection references) {
+ this.references.addAll(references);
+ }
+
+ public void setReferences(Collection references) {
+ this.references.clear();
+ addReferences(references);
}
public LinkedHashSet getDependencies() {
return dependencies;
}
- public void setDependencies(LinkedHashSet dependencies) {
- this.dependencies = dependencies;
+ public void addDependencies(Collection dependencies) {
+ this.dependencies.addAll(dependencies);
+ }
+
+ public void setDependencies(Collection dependencies) {
+ this.dependencies.clear();
+ addDependencies(dependencies);
}
public LinkedHashSet getIncludes() {
return includes;
}
- public void setIncludes(LinkedHashSet includes) {
- this.includes = includes;
+ public void addIncludes(Collection includes) {
+ this.includes.addAll(includes);
+ }
+
+ public void setIncludes(Collection includes) {
+ this.includes.clear();
+ addIncludes(includes);
}
public Set getHiddenClasses() {
return hiddenClasses;
}
- public void setHiddenClasses(Set hiddenClasses) {
- this.hiddenClasses = hiddenClasses;
+ public void addHiddenClasses(Collection hiddenClasses) {
+ this.hiddenClasses.addAll(hiddenClasses);
+ }
+
+ public void setHiddenClasses(Collection hiddenClasses) {
+ this.hiddenClasses.clear();
+ addHiddenClasses(hiddenClasses);
}
public Set getNonOverrideableClasses() {
return nonOverrideableClasses;
}
- public void setNonOverrideableClasses(Set nonOverrideableClasses) {
- this.nonOverrideableClasses = nonOverrideableClasses;
+ public void addNonOverrideableClasses(Collection nonOverrideableClasses) {
+ this.nonOverrideableClasses.addAll(nonOverrideableClasses);
+ }
+
+ public void setNonOverrideableClasses(Collection nonOverrideableClasses) {
+ this.nonOverrideableClasses.clear();
+ addNonOverrideableClasses(nonOverrideableClasses);
}
public boolean isInverseClassloading() {
@@ -128,5 +156,13 @@
public void setInverseClassloading(boolean inverseClassloading) {
this.inverseClassloading = inverseClassloading;
+ }
+
+ public boolean isSuppressDefaultParentId() {
+ return suppressDefaultParentId;
+ }
+
+ public void setSuppressDefaultParentId(boolean suppressDefaultParentId) {
+ this.suppressDefaultParentId = suppressDefaultParentId;
}
}
Modified: geronimo/branches/configid/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java (original)
+++ geronimo/branches/configid/modules/deployment/src/test/org/apache/geronimo/deployment/DeploymentContextTest.java Tue Feb 7 18:59:48 2006
@@ -46,10 +46,11 @@
basedir.mkdirs();
try {
basedir.deleteOnExit();
- Artifact configId = new Artifact("foo", "artifact", "1", "car", true);
+ Environment environment = new Environment();
+ environment.setConfigId(new Artifact("foo", "artifact", "1", "car", true));
Map nameKeys = new HashMap();
nameKeys.put("domain", "d");
- Environment environment = new Environment(configId, nameKeys, new LinkedHashSet(), new LinkedHashSet(), new LinkedHashSet(), new LinkedHashSet(), new HashSet(), new HashSet(), false);
+ environment.setNameKeys(nameKeys);
DeploymentContext context = new DeploymentContext(basedir, environment, ConfigurationModuleType.CAR, null);
Enhancer enhancer = new Enhancer();
enhancer.setInterfaces(new Class[]{DataSource.class});
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/ApplicationInfo.java Tue Feb 7 18:59:48 2006
@@ -21,6 +21,7 @@
import java.util.List;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.deployment.Environment;
import org.apache.xmlbeans.XmlObject;
/**
@@ -28,8 +29,7 @@
*/
public class ApplicationInfo {
private ConfigurationModuleType type;
- private URI configId;
- private List parentId;
+ private Environment environment;
private String applicationName;
private XmlObject specDD;
private XmlObject vendorDD;
@@ -40,16 +40,14 @@
public ApplicationInfo() {
}
- public ApplicationInfo(ConfigurationModuleType type, URI configId, List parentId, String applicationName, XmlObject specDD, XmlObject vendorDD, Set modules, Set moduleLocations, String originalSpecDD) {
+ public ApplicationInfo(ConfigurationModuleType type, Environment environment, String applicationName, XmlObject specDD, XmlObject vendorDD, Set modules, Set moduleLocations, String originalSpecDD) {
assert type != null;
- assert configId != null;
- assert parentId != null;
+ assert environment != null;
assert modules != null;
assert moduleLocations != null;
this.type = type;
- this.configId = configId;
- this.parentId = parentId;
+ this.environment = environment;
this.applicationName = applicationName;
this.specDD = specDD;
this.vendorDD = vendorDD;
@@ -66,20 +64,12 @@
this.type = type;
}
- public URI getConfigId() {
- return configId;
+ public Environment getEnvironment() {
+ return environment;
}
- public void setConfigId(URI configId) {
- this.configId = configId;
- }
-
- public List getParentId() {
- return parentId;
- }
-
- public void setParentId(List parentId) {
- this.parentId = parentId;
+ public void setEnvironment(Environment environment) {
+ this.environment = environment;
}
public String getApplicationName() {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/AppClientModule.java Tue Feb 7 18:59:48 2006
@@ -24,7 +24,9 @@
import java.util.jar.JarFile;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.common.DeploymentException;
import org.apache.xmlbeans.XmlObject;
/**
@@ -34,8 +36,8 @@
private JarFile earFile;
private Collection resourceModules;
- public AppClientModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
- super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+ public AppClientModule(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) throws DeploymentException {
+ super(standAlone, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
}
public ConfigurationModuleType getType() {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ConnectorModule.java Tue Feb 7 18:59:48 2006
@@ -19,19 +19,20 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.jar.JarFile;
-import java.util.List;
import java.io.IOException;
import org.apache.xmlbeans.XmlObject;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
+import org.apache.geronimo.common.DeploymentException;
/**
* @version $Rev$ $Date$
*/
public class ConnectorModule extends Module {
- public ConnectorModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
- super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+ public ConnectorModule(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) throws DeploymentException {
+ super(standAlone, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
}
public ConfigurationModuleType getType() {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Tue Feb 7 18:59:48 2006
@@ -42,12 +42,14 @@
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.ConfigurationBuilder;
+import org.apache.geronimo.deployment.Environment;
import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
+import org.apache.geronimo.deployment.service.EnvironmentBuilder;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.deployment.util.NestedJarFile;
-import org.apache.geronimo.deployment.xbeans.ClassFilterType;
-import org.apache.geronimo.deployment.xbeans.DependencyType;
+import org.apache.geronimo.deployment.xbeans.ArtifactType;
import org.apache.geronimo.deployment.xbeans.GbeanType;
+import org.apache.geronimo.deployment.xbeans.EnvironmentType;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
import org.apache.geronimo.gbean.GBeanData;
import org.apache.geronimo.gbean.GBeanInfo;
@@ -59,6 +61,7 @@
import org.apache.geronimo.kernel.config.ConfigurationData;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.Artifact;
import org.apache.geronimo.schema.SchemaConversionUtils;
import org.apache.geronimo.security.deployment.SecurityBuilder;
import org.apache.geronimo.security.deployment.SecurityConfiguration;
@@ -94,9 +97,10 @@
private final ObjectName transactionalTimerObjectName;
private final ObjectName nonTransactionalTimerObjectName;
private final ObjectName corbaGBeanObjectName;
+ private static final String DEFAULT_GROUPID = "defaultGroupId";
- public EARConfigBuilder(URI[] defaultParentId, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
+ public EARConfigBuilder(Artifact[] defaultParentId, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactionalTimerObjectName, ObjectName nonTransactionalTimerObjectName, ObjectName corbaGBeanObjectName, Repository repository, ModuleBuilder ejbConfigBuilder, EJBReferenceBuilder ejbReferenceBuilder, ModuleBuilder webConfigBuilder, ModuleBuilder connectorConfigBuilder, ResourceReferenceBuilder resourceReferenceBuilder, ModuleBuilder appClientConfigBuilder, ServiceReferenceBuilder serviceReferenceBuilder, Kernel kernel) {
this.kernel = kernel;
this.repository = repository;
this.defaultParentId = defaultParentId == null ? Collections.EMPTY_LIST : Arrays.asList(defaultParentId);
@@ -147,8 +151,7 @@
}
return new ApplicationInfo(module.getType(),
- module.getConfigId(),
- module.getParentId(),
+ module.getEnvironment(),
NameFactory.NULL,
null,
null,
@@ -206,24 +209,18 @@
throw new DeploymentException(e);
}
- // get the ids from either the application plan or for a stand alone module from the specific deployer
- URI configId = null;
- try {
- configId = new URI(gerApplication.getConfigId());
- } catch (URISyntaxException e) {
- throw new DeploymentException("Invalid configId " + gerApplication.getConfigId(), e);
+ EnvironmentType environmentType = gerApplication.getEnvironment();
+ Environment environment = EnvironmentBuilder.buildEnvironment(environmentType);
+ if (!environment.isSuppressDefaultParentId()) {
+ environment.addImports(defaultParentId);
}
-
- List parentId = ServiceConfigBuilder.toArtifacts(gerApplication.getParentId(), gerApplication.getImportArray());
- parentId.addAll(defaultParentId);
-
// get the modules either the application plan or for a stand alone module from the specific deployer
// todo change module so you can extract the real module path back out.. then we can eliminate
// the moduleLocations and have addModules return the modules
Set moduleLocations = new HashSet();
Set modules = new LinkedHashSet();
try {
- addModules(earFile, application, gerApplication, moduleLocations, modules);
+ addModules(earFile, application, gerApplication, moduleLocations, modules, environment);
} catch (Throwable e) {
// close all the modules
for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
@@ -241,11 +238,16 @@
throw new DeploymentException(e);
}
- String applicationName = gerApplication.isSetApplicationName() ? gerApplication.getApplicationName() : configId.toString();
+ //TODO extract override from environment name-key map.
+ String applicationName = null;
+ try {
+ applicationName = gerApplication.isSetApplicationName() ? gerApplication.getApplicationName() : environment.getConfigId().toURI().toString();
+ } catch (URISyntaxException e) {
+ throw new DeploymentException("Could not construct application name from configId", e);
+ }
return new ApplicationInfo(ConfigurationModuleType.EAR,
- configId,
- parentId,
+ environment,
applicationName,
application,
gerApplication,
@@ -258,6 +260,10 @@
private GerApplicationType createDefaultPlan(ApplicationType application, JarFile module) {
// construct the empty geronimo-application.xml
GerApplicationType gerApplication = GerApplicationType.Factory.newInstance();
+ EnvironmentType environmentType = gerApplication.addNewEnvironment();
+ ArtifactType artifactType = environmentType.addNewConfigId();
+
+ artifactType.setGroupId(DEFAULT_GROUPID);
// set the configId
String id = application.getId();
@@ -272,13 +278,19 @@
}
}
- gerApplication.setConfigId(id);
+ artifactType.setArtifactId(id);
+ artifactType.setVersion("" + System.currentTimeMillis());
+ artifactType.setType("car");
return gerApplication;
}
public URI getConfigurationID(Object plan, JarFile module) throws IOException, DeploymentException {
ApplicationInfo applicationInfo = (ApplicationInfo) plan;
- return applicationInfo.getConfigId();
+ try {
+ return applicationInfo.getEnvironment().getConfigId().toURI();
+ } catch (URISyntaxException e) {
+ throw new DeploymentException(e);
+ }
}
public ConfigurationData buildConfiguration(Object plan, JarFile earFile, File outfile) throws IOException, DeploymentException {
@@ -290,9 +302,8 @@
ConfigurationModuleType applicationType = applicationInfo.getType();
try {
earContext = new EARContext(outfile,
- applicationInfo.getConfigId(),
+ applicationInfo.getEnvironment(),
applicationType,
- applicationInfo.getParentId(),
kernel,
applicationInfo.getApplicationName(),
transactionContextManagerObjectName,
@@ -317,21 +328,6 @@
}
GerApplicationType geronimoApplication = (GerApplicationType) applicationInfo.getVendorDD();
- if (geronimoApplication != null) {
- // add dependencies declared in the geronimo-application.xml
- DependencyType[] dependencies = geronimoApplication.getDependencyArray();
- ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
-
- if (geronimoApplication.isSetInverseClassloading()) {
- earContext.setInverseClassloading(geronimoApplication.getInverseClassloading());
- }
-
- ClassFilterType[] filters = geronimoApplication.getHiddenClassesArray();
- ServiceConfigBuilder.addHiddenClasses(earContext, filters);
-
- filters = geronimoApplication.getNonOverridableClassesArray();
- ServiceConfigBuilder.addNonOverridableClasses(earContext, filters);
- }
// each module installs it's files into the output context.. this is different for each module type
Set modules = applicationInfo.getModules();
@@ -418,7 +414,7 @@
}
}
- private void addModules(JarFile earFile, ApplicationType application, GerApplicationType gerApplication, Set moduleLocations, Set modules) throws DeploymentException {
+ private void addModules(JarFile earFile, ApplicationType application, GerApplicationType gerApplication, Set moduleLocations, Set modules, Environment environment) throws DeploymentException {
Map altVendorDDs = new HashMap();
try {
if (earFile != null) {
@@ -537,7 +533,7 @@
moduleFile,
modulePath,
altSpecDD,
- URI.create(gerApplication.getConfigId()),
+ environment,
moduleContextInfo);
if (module == null) {
@@ -647,7 +643,7 @@
moduleFile,
moduleName,
altSpecDD,
- URI.create(gerApplication.getConfigId()),
+ environment,
moduleContextInfo);
if (module == null) {
@@ -698,7 +694,7 @@
static {
GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(EARConfigBuilder.class, NameFactory.CONFIG_BUILDER);
- infoFactory.addAttribute("defaultParentId", URI[].class, true, true);
+ infoFactory.addAttribute("defaultParentId", Artifact[].class, true, true);
infoFactory.addAttribute("transactionContextManagerObjectName", ObjectName.class, true);
infoFactory.addAttribute("connectionTrackerObjectName", ObjectName.class, true);
infoFactory.addAttribute("transactionalTimerObjectName", ObjectName.class, true);
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARContext.java Tue Feb 7 18:59:48 2006
@@ -26,6 +26,7 @@
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
@@ -56,8 +57,8 @@
private ObjectName jaccManagerName;
private SecurityConfiguration securityConfiguration;
- public EARContext(File baseDir, URI id, ConfigurationModuleType moduleType, List parentID, Kernel kernel, String j2eeApplicationName, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactedTimerName, ObjectName nonTransactedTimerName, ObjectName corbaGBeanObjectName, RefContext refContext) throws MalformedObjectNameException, DeploymentException {
- super(baseDir, id, moduleType, parentID, kernel);
+ public EARContext(File baseDir, Environment environment, ConfigurationModuleType moduleType, Kernel kernel, String j2eeApplicationName, ObjectName transactionContextManagerObjectName, ObjectName connectionTrackerObjectName, ObjectName transactedTimerName, ObjectName nonTransactedTimerName, ObjectName corbaGBeanObjectName, RefContext refContext) throws MalformedObjectNameException, DeploymentException {
+ super(baseDir, environment, moduleType, kernel);
j2eeContext = new J2eeContextImpl(getDomain(), getServer(), j2eeApplicationName == null ? NameFactory.NULL : j2eeApplicationName, NameFactory.J2EE_MODULE, NameFactory.NULL, null, null);
domainObjectName = NameFactory.getDomainName(null, j2eeContext);
serverObjectName = NameFactory.getServerName(null, null, j2eeContext);
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EJBModule.java Tue Feb 7 18:59:48 2006
@@ -19,19 +19,20 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.jar.JarFile;
-import java.util.List;
import java.io.IOException;
import org.apache.xmlbeans.XmlObject;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
+import org.apache.geronimo.common.DeploymentException;
/**
* @version $Rev$ $Date$
*/
public class EJBModule extends Module {
- public EJBModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) {
- super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
+ public EJBModule(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD) throws DeploymentException {
+ super(standAlone, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, null);
}
public ConfigurationModuleType getType() {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/Module.java Tue Feb 7 18:59:48 2006
@@ -27,6 +27,8 @@
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.deployment.util.DeploymentUtil;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
+import org.apache.geronimo.common.DeploymentException;
/**
* @version $Rev$ $Date$
@@ -34,8 +36,7 @@
public abstract class Module {
private final boolean standAlone;
private final String name;
- private final URI configId;
- private final List parentId;
+ private final Environment environment;
private final URI moduleURI;
private final JarFile moduleFile;
private final String targetPath;
@@ -47,12 +48,11 @@
private URI uniqueModuleLocation;
- protected Module(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String namespace) {
+ protected Module(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String namespace) throws DeploymentException {
assert targetPath != null: "targetPath is null";
this.standAlone = standAlone;
- this.configId = configId;
- this.parentId = parentId;
+ this.environment = environment;
this.moduleFile = moduleFile;
this.targetPath = targetPath;
this.specDD = specDD;
@@ -61,7 +61,12 @@
this.namespace = namespace;
if (standAlone) {
- name = configId.toString();
+ //TODO configid
+ try {
+ name = environment.getConfigId().toURI().toString();
+ } catch (URISyntaxException e) {
+ throw new DeploymentException("Could not construct module name from environment configId");
+ }
moduleURI = URI.create("");
} else {
name = targetPath;
@@ -81,12 +86,8 @@
return standAlone;
}
- public URI getConfigId() {
- return configId;
- }
-
- public List getParentId() {
- return parentId;
+ public Environment getEnvironment() {
+ return environment;
}
public URI getModuleURI() {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java Tue Feb 7 18:59:48 2006
@@ -22,6 +22,7 @@
import java.util.jar.JarFile;
import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Environment;
/**
* @version $Rev$ $Date$
@@ -29,7 +30,7 @@
public interface ModuleBuilder {
Module createModule(File plan, JarFile moduleFile) throws DeploymentException;
- Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException;
+ Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException;
void installModule(JarFile earFile, EARContext earContext, Module module) throws DeploymentException;
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java Tue Feb 7 18:59:48 2006
@@ -18,7 +18,6 @@
import java.io.File;
import java.io.IOException;
-import java.net.URI;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
@@ -28,6 +27,7 @@
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.Environment;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
import org.apache.geronimo.gbean.ReferenceCollection;
@@ -132,11 +132,11 @@
return builder;
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
+ public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException {
String namespace = getNamespaceFromPlan(plan);
ModuleBuilder builder = getBuilderFromNamespace(namespace);
if (builder != null) {
- return builder.createModule(plan, moduleFile, targetPath, specDDUrl, earConfigId, moduleContextInfo);
+ return builder.createModule(plan, moduleFile, targetPath, specDDUrl, environment, moduleContextInfo);
} else {
return null;
}
Modified: geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/WebModule.java Tue Feb 7 18:59:48 2006
@@ -19,7 +19,6 @@
import java.util.jar.JarFile;
import java.util.LinkedHashSet;
import java.util.Map;
-import java.util.List;
import java.net.URI;
import java.net.URISyntaxException;
import java.io.IOException;
@@ -27,6 +26,8 @@
import org.apache.xmlbeans.XmlObject;
import org.apache.geronimo.kernel.config.ConfigurationModuleType;
import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.deployment.Environment;
+import org.apache.geronimo.common.DeploymentException;
/**
* @version $Rev$ $Date$
@@ -37,8 +38,8 @@
private final String contextRoot;
private final Map portMap;
- public WebModule(boolean standAlone, URI configId, List parentId, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, Map portMap, String namespace) {
- super(standAlone, configId, parentId, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, namespace);
+ public WebModule(boolean standAlone, Environment environment, JarFile moduleFile, String targetPath, XmlObject specDD, XmlObject vendorDD, String originalSpecDD, String contextRoot, Map portMap, String namespace) throws DeploymentException {
+ super(standAlone, environment, moduleFile, targetPath, specDD, vendorDD, originalSpecDD, namespace);
this.contextRoot = contextRoot;
this.portMap = portMap;
}
Modified: geronimo/branches/configid/modules/j2ee-builder/src/schema/geronimo-application-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/schema/geronimo-application-1.1.xsd?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/schema/geronimo-application-1.1.xsd (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/schema/geronimo-application-1.1.xsd Tue Feb 7 18:59:48 2006
@@ -33,11 +33,7 @@
<xs:complexType name="applicationType">
<xs:sequence>
-<!-- <xs:element ref="sys:parent" minOccurs="0" maxOccurs="unbounded"/>-->
-<!-- <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>-->
-<!-- <xs:element ref="sys:hidden-classes" minOccurs="0" maxOccurs="unbounded"/>-->
-<!-- <xs:element ref="sys:non-overridable-classes" minOccurs="0" maxOccurs="unbounded"/>-->
- <xs:group ref="sys:classloader-infoGroup"/>
+ <xs:element ref="sys:environment"/>
<xs:element name="module" type="geronimo:moduleType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ext-module" type="geronimo:ext-moduleType" minOccurs="0" maxOccurs="unbounded"/>
@@ -45,10 +41,8 @@
<xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
- <xs:attribute name="configId" type="xs:string" use="required"/>
- <xs:attribute name="parentId" type="xs:string" use="optional"/>
+ <!--TODO application name should be settable using name-key in the environment. Does this work? -->
<xs:attribute name="application-name" type="xs:string" use="optional"/>
- <xs:attribute name="inverseClassloading" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="moduleType">
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear/META-INF/geronimo-application.xml Tue Feb 7 18:59:48 2006
@@ -16,11 +16,25 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
-
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ <name-key>
+ <key>domain</key>
+ <value>geronimo.test</value>
+ </name-key>
+ <name-key>
+ <key>J2EEServer</key>
+ <value>geronimo</value>
+ </name-key>
+ </environment>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo"
+ class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-ejb-jar/META-INF/openejb-jar.xml Tue Feb 7 18:59:48 2006
@@ -16,9 +16,16 @@
limitations under the License.
-->
<openejb-jar
- xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
- configId="org/openejb/itests"
- parentId="org/apache/geronimo/Server">
+ xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
+
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ejb</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
<cmp-connection-factory>DefaultDatasource</cmp-connection-factory>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-rar/META-INF/geronimo-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-rar/META-INF/geronimo-ra.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-rar/META-INF/geronimo-ra.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-rar/META-INF/geronimo-ra.xml Tue Feb 7 18:59:48 2006
@@ -16,8 +16,14 @@
limitations under the License.
-->
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-rar</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
</connector>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear/test-war/WEB-INF/geronimo-web.xml Tue Feb 7 18:59:48 2006
@@ -16,7 +16,15 @@
limitations under the License.
-->
-<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
+<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
<jetty:context-priority-classloader>false</jetty:context-priority-classloader>
<!--
<jetty:security>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/META-INF/geronimo-application.xml Tue Feb 7 18:59:48 2006
@@ -16,11 +16,25 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ <name-key>
+ <key>domain</key>
+ <value>geronimo.test</value>
+ </name-key>
+ <name-key>
+ <key>J2EEServer</key>
+ <value>geronimo</value>
+ </name-key>
+ </environment>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-ejb-jar/META-INF/openejb-jar.xml Tue Feb 7 18:59:48 2006
@@ -17,9 +17,15 @@
-->
<openejb-jar
- xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
- configId="org/openejb/itests"
- parentId="org/apache/geronimo/Server">
+ xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ejb</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
<cmp-connection-factory>DefaultDatasource</cmp-connection-factory>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-ear13/test-war/WEB-INF/geronimo-web.xml Tue Feb 7 18:59:48 2006
@@ -16,7 +16,15 @@
limitations under the License.
-->
-<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
+<jetty:web-app xmlns:jetty="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
<jetty:context-priority-classloader>false</jetty:context-priority-classloader>
<!--
<jetty:security>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-car.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-car.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-car.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-car.xml Tue Feb 7 18:59:48 2006
@@ -16,9 +16,15 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
<module>
<java>this-is-invalid.jar</java>
@@ -26,6 +32,6 @@
</module>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-ejb-jar.xml Tue Feb 7 18:59:48 2006
@@ -16,16 +16,22 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
-
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
+
<module>
<ejb>this-is-invalid.jar</ejb>
<alt-dd>this-does-not-exist.xml</alt-dd>
</module>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-rar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-rar.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-rar.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-rar.xml Tue Feb 7 18:59:48 2006
@@ -16,16 +16,22 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
-
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
+
<module>
<connector>this-is-invalid.rar</connector>
<alt-dd>this-does-not-exist.xml</alt-dd>
</module>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-war.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-war.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-war.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-plan/test-bad-war.xml Tue Feb 7 18:59:48 2006
@@ -16,16 +16,22 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
-
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ </environment>
+
<module>
<web>this-is-invalid.war</web>
<alt-dd>this-does-not-exist.xml</alt-dd>
</module>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application-alt-dd.xml Tue Feb 7 18:59:48 2006
@@ -16,9 +16,23 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ <name-key>
+ <key>domain</key>
+ <value>geronimo.test</value>
+ </name-key>
+ <name-key>
+ <key>J2EEServer</key>
+ <value>geronimo</value>
+ </name-key>
+ </environment>
<module>
<web>test-war/</web>
@@ -34,6 +48,6 @@
</module>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/META-INF/geronimo-application.xml Tue Feb 7 18:59:48 2006
@@ -16,11 +16,25 @@
limitations under the License.
-->
-<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
+ <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
+ <configId>
+ <groupId>geronimo</groupId>
+ <type>car</type>
+ <artifactId>test-ear</artifactId>
+ <version>1.0</version>
+ </configId>
+ <name-key>
+ <key>domain</key>
+ <value>geronimo.test</value>
+ </name-key>
+ <name-key>
+ <key>J2EEServer</key>
+ <value>geronimo</value>
+ </name-key>
+ </environment>
<!-- a random gbean just to verify that the deployer doesn't die because of it -->
- <gbean gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
+ <gbean xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1" gbeanName="foo:j2eeType=J2EEDomain,name=foo" class="org.apache.geronimo.j2ee.management.impl.J2EEDomainImpl"/>
</application>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ejb-jar.xml Tue Feb 7 18:59:48 2006
@@ -16,9 +16,7 @@
limitations under the License.
-->
<openejb-jar
- xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
- configId="org/openejb/itests"
- parentId="org/apache/geronimo/Server">
+ xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
<cmp-connection-factory>DefaultDatasource</cmp-connection-factory>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ra.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ra.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ra.xml (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test-unpacked-ear/alt-ger-ra.xml Tue Feb 7 18:59:48 2006
@@ -16,8 +16,6 @@
limitations under the License.
-->
-<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee"
- configId="org/apache/geronimo/j2ee/deployment/test"
- parentId="org/apache/geronimo/Server">
+<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee">
</connector>
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java Tue Feb 7 18:59:48 2006
@@ -17,20 +17,6 @@
package org.apache.geronimo.j2ee.deployment;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.net.URI;
-import java.net.URL;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.JarFile;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.xml.namespace.QName;
-
import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -51,6 +37,21 @@
import org.apache.geronimo.kernel.config.InvalidConfigException;
import org.apache.geronimo.kernel.config.NoSuchConfigException;
import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.net.URI;
+import java.net.URL;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.JarFile;
/**
* @version $Rev$ $Date$
@@ -78,12 +79,12 @@
private static final ObjectName connectionTrackerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ConnectionTracker");
private static final ObjectName transactionalTimerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ThreadPooledTimer,name=TransactionalThreaPooledTimer");
private static final ObjectName nonTransactionalTimerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ThreadPooledTimer,name=NonTransactionalThreaPooledTimer");
- private URI[] defaultParentId;
+ private Artifact[] defaultParentId;
private static String contextRoot = "test";
private static final Map portMap = null;
protected void setUp() throws Exception {
- defaultParentId = new URI[] {new URI("org/apache/geronimo/Server")};
+ defaultParentId = new Artifact[] {new Artifact("geronimo", "test", "1", "car", true)};
}
public static Test suite() throws Exception {
@@ -91,10 +92,10 @@
TestSetup setup14 = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-ear.ear"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -107,10 +108,10 @@
TestSetup setupNaked14 = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear14/test-naked-ear.ear"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -123,10 +124,10 @@
TestSetup setup13 = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-ear.ear"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -139,10 +140,10 @@
TestSetup setupNaked13 = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-ear13/test-naked-ear.ear"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -155,10 +156,10 @@
TestSetup setupUnpacked = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/full/"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar/", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -171,10 +172,10 @@
TestSetup setupUnpackedNaked = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/naked/"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar/", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -187,10 +188,10 @@
TestSetup setupUnpackedAltDD = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd/"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar/", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -203,10 +204,10 @@
TestSetup setupPackedAltDD = new TestSetup(inner) {
protected void setUp() throws Exception {
earFile = DeploymentUtil.createJarFile(new File(basedir, "target/test-unpacked-ear/alt-dd.ear"));
- ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, null, "test-ejb-jar.jar/", null, null, null);
+ ejbConfigBuilder.ejbModule = new EJBModule(false, null, null, "test-ejb-jar.jar/", null, null, null);
webConfigBuilder.contextRoot = contextRoot;
- webConfigBuilder.webModule = new WebModule(false, null, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
- connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, null, "test-rar.rar", null, null, null);
+ webConfigBuilder.webModule = new WebModule(false, null, null, "test-war.war/", null, null, null, contextRoot, portMap, WEB_NAMESPACE);
+ connectorConfigBuilder.connectorModule = new ConnectorModule(false, null, null, "test-rar.rar", null, null, null);
}
protected void tearDown() {
@@ -389,27 +390,24 @@
this.kernel = kernel;
}
- public URI install(URL source) throws IOException, InvalidConfigException {
+ public Artifact install(URL source) throws IOException, InvalidConfigException {
return null;
}
public void install(ConfigurationData configurationData, File source) throws IOException, InvalidConfigException {
}
- public void uninstall(URI configID) throws NoSuchConfigException, IOException {
+ public void uninstall(Artifact configID) throws NoSuchConfigException, IOException {
}
- public ObjectName loadConfiguration(URI configId) throws NoSuchConfigException, IOException, InvalidConfigException {
- ObjectName configurationObjectName = null;
- try {
- configurationObjectName = Configuration.getConfigurationObjectName(configId);
- } catch (MalformedObjectNameException e) {
- throw new InvalidConfigException(e);
- }
+ public ObjectName loadConfiguration(Artifact configId) throws NoSuchConfigException, IOException, InvalidConfigException {
+ ObjectName configurationObjectName = Configuration.getConfigurationObjectName(configId);
GBeanData configData = new GBeanData(configurationObjectName, Configuration.GBEAN_INFO);
configData.setAttribute("id", configId);
- configData.setAttribute("domain", "test");
- configData.setAttribute("server", "bar");
+ Map nameKeys = new HashMap();
+ nameKeys.put("domain", "geronimo.test");
+ nameKeys.put("J2EEServer", "geronimo");
+ configData.setAttribute("nameKeys", nameKeys);
configData.setAttribute("gBeanState", NO_OBJECTS_OS);
try {
@@ -421,7 +419,7 @@
return configurationObjectName;
}
- public boolean containsConfiguration(URI configID) {
+ public boolean containsConfiguration(Artifact configID) {
return true;
}
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java Tue Feb 7 18:59:48 2006
@@ -18,7 +18,6 @@
import java.io.File;
import java.net.URL;
-import java.net.URI;
import java.util.jar.JarFile;
import javax.naming.Reference;
@@ -27,6 +26,7 @@
import junit.framework.Assert;
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.deployment.Environment;
/**
* @version $Rev$ $Date$
@@ -37,11 +37,11 @@
public ClassLoader cl;
public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
- return new ConnectorModule(true, null, null, moduleFile, "connector", null, null, null);
+ return new ConnectorModule(true, null, moduleFile, "connector", null, null, null);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
- return new ConnectorModule(false, null, null, moduleFile, targetPath, null, null, null);
+ public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException {
+ return new ConnectorModule(false, null, moduleFile, targetPath, null, null, null);
}
public void installModule(JarFile earFile, EARContext earContext, Module connectorModule) {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java Tue Feb 7 18:59:48 2006
@@ -27,6 +27,7 @@
import org.apache.geronimo.common.DeploymentException;
import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.deployment.Environment;
/**
@@ -38,11 +39,11 @@
public ClassLoader cl;
public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
- return new EJBModule(true, null, null, moduleFile, "ejb.jar", null, null, null);
+ return new EJBModule(true, null, moduleFile, "ejb.jar", null, null, null);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
- return new EJBModule(false, null, null, moduleFile, targetPath, null, null, null);
+ public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException {
+ return new EJBModule(false, null, moduleFile, targetPath, null, null, null);
}
public void installModule(JarFile earFile, EARContext earContext, Module ejbModule) {
Modified: geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java (original)
+++ geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java Tue Feb 7 18:59:48 2006
@@ -18,14 +18,12 @@
import java.io.File;
import java.net.URL;
-import java.net.URI;
import java.util.jar.JarFile;
import java.util.Map;
-import javax.management.ObjectName;
-
import junit.framework.Assert;
import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.Environment;
/**
* @version $Rev$ $Date$
@@ -39,11 +37,11 @@
private String namespace = "foo";
public Module createModule(File plan, JarFile moduleFile) throws DeploymentException {
- return new WebModule(true, null, null, moduleFile, "war", null, null, null, contextRoot, portMap, namespace);
+ return new WebModule(true, null, moduleFile, "war", null, null, null, contextRoot, portMap, namespace);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
- return new WebModule(false, null, null, moduleFile, targetPath, null, null, null, contextRoot, portMap, namespace);
+ public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException {
+ return new WebModule(false, null, moduleFile, targetPath, null, null, null, contextRoot, portMap, namespace);
}
public void installModule(JarFile earFile, EARContext earContext, Module webModule) throws DeploymentException {
Modified: geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/GBeanElementConverter.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/GBeanElementConverter.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/GBeanElementConverter.java (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/GBeanElementConverter.java Tue Feb 7 18:59:48 2006
@@ -25,7 +25,7 @@
*/
public class GBeanElementConverter implements ElementConverter {
- private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.0";
+ private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.1";
public void convertElement(XmlCursor cursor, XmlCursor end) {
Modified: geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java Tue Feb 7 18:59:48 2006
@@ -43,7 +43,7 @@
static final String GERONIMO_NAMING_NAMESPACE = "http://geronimo.apache.org/xml/ns/naming-1.0";
private static final String GERONIMO_SECURITY_NAMESPACE = "http://geronimo.apache.org/xml/ns/security-1.1";
- private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.0";
+ private static final String GERONIMO_SERVICE_NAMESPACE = "http://geronimo.apache.org/xml/ns/deployment-1.1";
private static final QName RESOURCE_ADAPTER_VERSION = new QName(J2EE_NAMESPACE, "resourceadapter-version");
private static final QName TAGLIB = new QName(J2EE_NAMESPACE, "taglib");
Modified: geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/ejb-naming-post.xml Tue Feb 7 18:59:48 2006
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<openejb-jar configId="org/openejb/Itests" parentId="org/apache/geronimo/DefaultDatabase" xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.0">
+<openejb-jar configId="org/openejb/Itests" parentId="org/apache/geronimo/DefaultDatabase" xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0" xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:dependency>
<dep:uri>junit/jars/junit-3.8.jar</dep:uri>
</dep:dependency>
Modified: geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/gbean-post.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/gbean-post.xml?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/gbean-post.xml (original)
+++ geronimo/branches/configid/modules/j2ee-schema/src/test-data/geronimo/gbean-post.xml Tue Feb 7 18:59:48 2006
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<gbean name="client-properties-realm"
- class="org.apache.geronimo.security.realm.GenericSecurityRealm" xmlns="http://geronimo.apache.org/xml/ns/deployment-1.0">
+ class="org.apache.geronimo.security.realm.GenericSecurityRealm" xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
<attribute name="realmName">client-properties-realm</attribute>
<xml-reference name="LoginModuleConfiguration">
<lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig">
Modified: geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=375831&r1=375830&r2=375831&view=diff
==============================================================================
--- geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java Tue Feb 7 18:59:48 2006
@@ -26,6 +26,7 @@
import org.apache.geronimo.deployment.xbeans.DependencyType;
import org.apache.geronimo.deployment.xbeans.GbeanType;
import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
+import org.apache.geronimo.deployment.Environment;
import org.apache.geronimo.gbean.GBeanData;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -193,7 +194,7 @@
return createModule(plan, moduleFile, "war", null, true, null);
}
- public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, URI earConfigId, Object moduleContextInfo) throws DeploymentException {
+ public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl, Environment environment, Object moduleContextInfo) throws DeploymentException {
return createModule(plan, moduleFile, targetPath, specDDUrl, false, (String) moduleContextInfo);
}
@@ -261,7 +262,7 @@
if (parentId.isEmpty()) {
parentId = new ArrayList(defaultParentId);
}
- WebModule module = new WebModule(standAlone, configId, parentId, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
+ WebModule module = new WebModule(standAlone, configId, moduleFile, targetPath, webApp, jettyWebApp, specDD, contextRoot, portMap, JETTY_NAMESPACE);
return module;
}