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/20 21:18:42 UTC
svn commit: r379220 [2/2] - in /geronimo/branches/configid:
configs/client-security/src/plan/ configs/console-jetty/src/plan/
configs/console-tomcat/src/plan/ configs/daytrader-jetty/src/plan/
configs/daytrader-tomcat/src/plan/ configs/geronimo-gbean-d...
Modified: geronimo/branches/configid/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd (original)
+++ geronimo/branches/configid/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd Mon Feb 20 12:18:37 2006
@@ -36,7 +36,7 @@
<xs:complexType name="web-appType">
<xs:sequence>
- <xs:element ref="sys:environment"/>
+ <xs:element ref="sys:environment" minOccurs="0"/>
<xs:element name="context-root" type="xs:string" minOccurs="0"/>
<xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>
Modified: geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java (original)
+++ geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java Mon Feb 20 12:18:37 2006
@@ -65,6 +65,8 @@
import org.apache.geronimo.kernel.Kernel;
import org.apache.geronimo.kernel.KernelFactory;
import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
import org.apache.geronimo.kernel.config.Configuration;
import org.apache.geronimo.kernel.config.ConfigurationData;
import org.apache.geronimo.kernel.config.ConfigurationManager;
@@ -156,7 +158,7 @@
}
public void testDeployWar5() throws Exception {
- deployWar("war5", "unknown/hello/1/car");
+ deployWar("war5", "test/foo/1/car");
}
public void deployWar(String warName, String name) throws Exception {
@@ -377,6 +379,17 @@
configurationManagerData.setReferencePatterns("Stores", Collections.singleton(store.getName()));
kernel.loadGBean(configurationManagerData, getClass().getClassLoader());
kernel.startGBean(configurationManagerName);
+
+ GBeanData manager = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactManager"), DefaultArtifactManager.GBEAN_INFO);
+ kernel.loadGBean(manager, this.getClass().getClassLoader());
+ kernel.startGBean(manager.getName());
+
+ GBeanData resolver = new GBeanData(JMXUtil.getObjectName("foo:name=ArtifactResolver"), DefaultArtifactResolver.GBEAN_INFO);
+ resolver.setReferencePattern("ArtifactManager", manager.getName());
+// resolver.setReferencePattern("Repositories", repository.getName());
+ kernel.loadGBean(resolver, this.getClass().getClassLoader());
+ kernel.startGBean(resolver.getName());
+
ConfigurationManager configurationManager = (ConfigurationManager) kernel.getProxyManager().createProxy(configurationManagerName, ConfigurationManager.class);
configurationManager.load((Artifact) parentId.get(0));
Modified: geronimo/branches/configid/modules/web-builder/src/schema/geronimo-web-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/web-builder/src/schema/geronimo-web-1.1.xsd?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/modules/web-builder/src/schema/geronimo-web-1.1.xsd (original)
+++ geronimo/branches/configid/modules/web-builder/src/schema/geronimo-web-1.1.xsd Mon Feb 20 12:18:37 2006
@@ -36,7 +36,7 @@
<xs:complexType name="web-appType">
<xs:sequence>
- <xs:element ref="sys:environment"/>
+ <xs:element ref="sys:environment" minOccurs="0"/>
<xs:element name="context-root" type="xs:string" minOccurs="0"/>
<xs:element name="context-priority-classloader" type="xs:boolean" minOccurs="0"/>
Modified: geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java (original)
+++ geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java Mon Feb 20 12:18:37 2006
@@ -88,6 +88,7 @@
ObjectName name = Configuration.getConfigurationObjectName(configId);
config.setName(name);
+ config.setAttribute("configurationStore", this);
config.setAttribute("baseURL", baseURL);
try {
@@ -123,8 +124,8 @@
}
public URL resolve(Artifact configId, URI uri) throws NoSuchConfigException, MalformedURLException {
- //unless we actually need to set up the configuration's classloader, this won't get called
- return null;
+ URL baseURL = new URL("jar:" + repository.getLocation(configId).toURL().toString() + "!/");
+ return new URL(baseURL, uri.toString());
}
public Artifact install(URL source) throws IOException, InvalidConfigException {
Modified: geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java?rev=379220&r1=379219&r2=379220&view=diff
==============================================================================
--- geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java (original)
+++ geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java Mon Feb 20 12:18:37 2006
@@ -28,6 +28,8 @@
import org.apache.geronimo.kernel.config.ConfigurationManagerImpl;
import org.apache.geronimo.kernel.config.ConfigurationUtil;
import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.DefaultArtifactManager;
+import org.apache.geronimo.kernel.repository.DefaultArtifactResolver;
import org.apache.log4j.BasicConfigurator;
import javax.management.MalformedObjectNameException;
@@ -53,7 +55,8 @@
* The name of the GBean that will load dependencies from the Maven repository.
*/
private static final ObjectName REPOSITORY_NAME;
-
+ private static final ObjectName ARTIFACT_MANAGER_NAME;
+ private static final ObjectName ARTIFACT_RESOLVER_NAME;
/**
* The name of the GBean that will load Configurations from the Maven repository.
*/
@@ -89,6 +92,8 @@
static {
try {
REPOSITORY_NAME = new ObjectName(KERNEL_NAME + ":name=Repository");
+ ARTIFACT_MANAGER_NAME = new ObjectName(KERNEL_NAME + ":name=ArtifactManager");
+ ARTIFACT_RESOLVER_NAME = new ObjectName(KERNEL_NAME + ":name=ArtifactResolver");
CONFIGSTORE_NAME = new ObjectName(KERNEL_NAME + ":name=MavenConfigStore,j2eeType=ConfigurationStore");
CONFIGMANAGER_NAME = new ObjectName(KERNEL_NAME + ":name=ConfigurationManager,j2eeType=ConfigurationManager");
ATTRIBUTESTORE_NAME = new ObjectName(KERNEL_NAME + ":name=ManagedAttributeStore");
@@ -328,6 +333,17 @@
repoGBean.setAttribute("root", repositoryURI);
kernel.loadGBean(repoGBean, cl);
kernel.startGBean(REPOSITORY_NAME);
+
+ //TODO parameterize these?
+ GBeanData artifactManagerGBean = new GBeanData(ARTIFACT_MANAGER_NAME, DefaultArtifactManager.GBEAN_INFO);
+ kernel.loadGBean(artifactManagerGBean, cl);
+ kernel.startGBean(ARTIFACT_MANAGER_NAME);
+
+ GBeanData artifactResolverGBean = new GBeanData(ARTIFACT_RESOLVER_NAME, DefaultArtifactResolver.GBEAN_INFO);
+ artifactResolverGBean.setReferencePattern("Repositories", REPOSITORY_NAME);
+ artifactResolverGBean.setReferencePattern("ArtifactManager", ARTIFACT_MANAGER_NAME);
+ kernel.loadGBean(artifactResolverGBean, cl);
+ kernel.startGBean(ARTIFACT_RESOLVER_NAME);
GBeanInfo configStoreInfo = GBeanInfo.getGBeanInfo(configStoreClass, cl);
GBeanData storeGBean = new GBeanData(CONFIGSTORE_NAME, configStoreInfo);