geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r385372 [3/3] - in /geronimo/branches/1.1/modules: client-builder/src/java/org/apache/geronimo/client/builder/ client-builder/src/schema/ connector-builder/src/java/org/apache/geronimo/connector/deployment/ connector-builder/src/schema/ con...
Date Sun, 12 Mar 2006 21:44:53 GMT
Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanProxyReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanProxyReference.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanProxyReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanProxyReference.java
Sun Mar 12 13:44:50 2006
@@ -16,20 +16,23 @@
  */
 package org.apache.geronimo.naming.reference;
 
-import javax.management.ObjectName;
-
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.proxy.ProxyManager;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.naming.NameNotFoundException;
 
 /**
  * @version $Rev$ $Date$
  */
-public class GBeanProxyReference extends SimpleAwareReference {
-    private final ObjectName target;
+public class GBeanProxyReference extends ConfigurationAwareReference {
     private final Class type;
 
-    public GBeanProxyReference(ObjectName target, Class type) {
-        this.target = target;
+    public GBeanProxyReference(Artifact configId, AbstractNameQuery abstractNameQuery, Class
type) {
+        super(configId, abstractNameQuery);
         this.type = type;
     }
 
@@ -37,7 +40,13 @@
         return type.getName();
     }
 
-    public Object getContent() throws IllegalStateException {
+    public Object getContent() throws IllegalStateException, NameNotFoundException {
+        AbstractName target;
+        try {
+            target = resolveTargetName();
+        } catch (GBeanNotFoundException e) {
+            throw (NameNotFoundException)new NameNotFoundException("Could not resolve gbean
from name query: " + abstractNameQuery).initCause(e);
+        }
         Kernel kernel = getKernel();
         // todo HACK: this is a very bad idea
         ProxyManager proxyManager = kernel.getProxyManager();

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
Sun Mar 12 13:44:50 2006
@@ -16,20 +16,21 @@
  */
 package org.apache.geronimo.naming.reference;
 
-import javax.management.ObjectName;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Artifact;
+
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 
-import org.apache.geronimo.kernel.Kernel;
-
 /**
  * @version $Rev$ $Date$
  */
-public class ORBReference extends SimpleAwareReference {
-    private final ObjectName corbaGBean;
+public class ORBReference extends ConfigurationAwareReference {
 
-    public ORBReference(ObjectName corbaGBean) {
-        this.corbaGBean = corbaGBean;
+    public ORBReference(Artifact configId, AbstractNameQuery abstractNameQuery) {
+        super(configId, abstractNameQuery);
     }
 
     public String getClassName() {
@@ -39,9 +40,10 @@
     public Object getContent() throws NamingException {
         Kernel kernel = getKernel();
         try {
-            return kernel.getAttribute(corbaGBean, "ORB");
+            AbstractName targetName = resolveTargetName();
+            return kernel.getAttribute(targetName, "ORB");
         } catch (Exception e) {
-            throw (NameNotFoundException) new NameNotFoundException("Error getting ORB attribut
from CORBAGBean: objectName=" + corbaGBean).initCause(e);
+            throw (NameNotFoundException) new NameNotFoundException("Error getting ORB attribut
from CORBAGBean: name query =" + abstractNameQuery).initCause(e);
         }
     }
 }

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
Sun Mar 12 13:44:50 2006
@@ -17,20 +17,22 @@
 
 package org.apache.geronimo.naming.reference;
 
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.repository.Artifact;
+
+import javax.naming.NameNotFoundException;
 
 /**
  * @version $Rev$ $Date$
  */
-public class ResourceReference extends SimpleAwareReference {
-    private final String containerId;
+public class ResourceReference extends ConfigurationAwareReference {
     private final Class iface;
 
-    public ResourceReference(String containerId, Class iface) {
-        this.containerId = containerId;
+    public ResourceReference(Artifact configId, AbstractNameQuery abstractNameQuery, Class
iface) {
+        super(configId, abstractNameQuery);
         this.iface = iface;
     }
 
@@ -38,24 +40,24 @@
         return iface.getName();
     }
 
-    public Object getContent() {
+    public Object getContent() throws NameNotFoundException {
         Kernel kernel = getKernel();
 
-        ObjectName target = null;
+        AbstractName target;
         try {
-            target = ObjectName.getInstance(containerId);
-        } catch (MalformedObjectNameException e) {
-            throw (IllegalArgumentException) new IllegalArgumentException("Invalid object
name in jmxRefAddr: " + containerId).initCause(e);
+            target = resolveTargetName();
+        } catch (GBeanNotFoundException e) {
+            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name
query: " + abstractNameQuery).initCause(e);
         }
 
-        Object proxy = null;
+        Object proxy;
         try {
             proxy = kernel.invoke(target, "$getResource");
         } catch (Exception e) {
             throw (IllegalStateException) new IllegalStateException("Could not get proxy").initCause(e);
         }
         if (proxy == null) {
-            throw new IllegalStateException("Proxy not returned. Target " + containerId +
" not started");
+            throw new IllegalStateException("Proxy not returned. Target " + target + " not
started");
         }
         if (!iface.isAssignableFrom(proxy.getClass())) {
             Class proxyClass = proxy.getClass();

Modified: geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/test/org/apache/geronimo/naming/java/ContextBuilderTest.java
Sun Mar 12 13:44:50 2006
@@ -22,8 +22,6 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-import java.util.Map;
-import java.util.HashMap;
 import javax.management.ObjectName;
 import javax.naming.NameClassPair;
 import javax.naming.NamingEnumeration;

Modified: geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd (original)
+++ geronimo/branches/1.1/modules/service-builder/src/schema/geronimo-config-1.1.xsd Sun Mar
12 13:44:50 2006
@@ -259,8 +259,18 @@
     </xs:complexType>
 
     <xs:complexType name="patternType">
-        <xs:sequence>
-            <xs:group ref="sys:gbean-nameGroup"/>
+        <xs:annotation>
+            <xs:documentation>This group contains the components of an abstract name</xs:documentation>
+        </xs:annotation>
+         <xs:sequence>
+            <xs:sequence>
+                <xs:element name="groupId" type="xs:string" minOccurs="0"/>
+                <xs:element name="artifactId" type="xs:string" minOccurs="0"/>
+                <xs:element name="version" type="xs:string" minOccurs="0"/>
+                <xs:element name="module" type="xs:string" minOccurs="0"/>
+                <xs:element name="type" type="xs:string" minOccurs="0"/>
+                <xs:element name="name" type="xs:string"/>
+            </xs:sequence>
         </xs:sequence>
     </xs:complexType>
 
@@ -272,24 +282,6 @@
         </xs:complexContent>
     </xs:complexType>
 
-    <xs:group name="gbean-nameGroup">
-        <xs:annotation>
-            <xs:documentation>This group contains the components of an abstract name</xs:documentation>
-        </xs:annotation>
-        <xs:choice>
-            <xs:sequence>
-                <xs:element name="groupId" type="xs:string" minOccurs="0"/>
-                <xs:element name="artifactId" type="xs:string"/>
-                <xs:element name="version" type="xs:string" minOccurs="0"/>
-                <xs:element name="module" type="xs:string" minOccurs="0"/>
-                <xs:element name="type" type="xs:string" minOccurs="0"/>
-                <xs:element name="name" type="xs:string"/>
-            </xs:sequence>
-            <!-- todo try to eliminate explicit gbean-name -->
-            <xs:element name="gbean-name" type="xs:string"/>
-        </xs:choice>
-    </xs:group>
-    
     <xs:element name="service" type="sys:serviceType"/>
 
     <xs:complexType name="serviceType">

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd (original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/schema/geronimo-tomcat-1.1.xsd Sun Mar
12 13:44:50 2006
@@ -19,7 +19,7 @@
 <xs:schema
     xmlns:tomcat="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
     targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
-    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
     xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
@@ -27,7 +27,7 @@
     attributeFormDefault="unqualified"
     version="1.1">
 
-    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.0" schemaLocation="geronimo-naming-1.0.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.1" schemaLocation="geronimo-naming-1.1.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/security-1.1" schemaLocation="geronimo-security-1.1.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.1" schemaLocation="geronimo-config-1.1.xsd"/>
 

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Sun Mar 12 13:44:50 2006
@@ -50,6 +50,7 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.Module;
@@ -91,7 +92,7 @@
 import org.apache.geronimo.transaction.manager.TransactionManagerImplGBean;
 
 /**
- * @version $Rev: 384933 $ $Date$
+ * @version $Rev:385232 $ $Date$
  */
 public class TomcatModuleBuilderTest extends TestCase {
     private String DOMAIN_NAME = "geronimo.test";
@@ -267,13 +268,13 @@
                     }
                 }, new ResourceReferenceBuilder() {
 
-                    public Reference createResourceRef(String containerId,
-                                                       Class iface) throws DeploymentException
{
+                    public Reference createResourceRef(AbstractNameQuery containerId,
+                                                       Class iface, Configuration configuration)
throws DeploymentException {
                         return null;
                     }
 
-                    public Reference createAdminObjectRef(String containerId,
-                                                          Class iface) throws DeploymentException
{
+                    public Reference createAdminObjectRef(AbstractNameQuery containerId,
+                                                          Class iface, Configuration configuration)
throws DeploymentException {
                         return null;
                     }
 

Modified: geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
(original)
+++ geronimo/branches/1.1/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatManagerImpl.java
Sun Mar 12 13:44:50 2006
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Hashtable;
-import java.net.URISyntaxException;
 import javax.management.ObjectName;
 import javax.management.MalformedObjectNameException;
 import org.apache.geronimo.management.geronimo.WebManager;
@@ -29,6 +28,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.j2ee.management.impl.Util;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
@@ -64,19 +64,19 @@
      * customization before being fully functional (e.g. SSL settings for a secure connector).
 This may need to be done
      * before starting the resulting connector.
      *
-     * @param containerObjectName The ObjectName of the container that the connector should
be added to
+     * @param containerName
      * @param uniqueName          A name fragment that's unique to this connector
      * @param protocol            The protocol that the connector should use
      * @param host                The host name or IP that the connector should listen on
      * @param port                The port that the connector should listen on
      * @return The ObjectName of the new connector.
      */
-    public String addConnector(String containerObjectName, String uniqueName, String protocol,
String host, int port) {
+    public AbstractName addConnector(AbstractName containerName, String uniqueName, String
protocol, String host, int port) {
         ObjectName container;
         try {
-            container = ObjectName.getInstance(containerObjectName);
+            container = ObjectName.getInstance(containerName);
         } catch (MalformedObjectNameException e) {
-            throw new IllegalArgumentException("Invalid web container ObjectName '"+containerObjectName+"'");
+            throw new IllegalArgumentException("Invalid web container ObjectName '"+containerName
+"'");
         }
         ObjectName name = getConnectorName(container, protocol, uniqueName);
         GBeanData connector;
@@ -143,13 +143,14 @@
     /**
      * Removes a connector.  This shuts it down if necessary, and removes it from the server
environment.  It must be a
      * connector that uses this network technology.
+     * @param connectorName
      */
-    public void removeConnector(String objectName) {
+    public void removeConnector(AbstractName connectorName) {
         ObjectName name = null;
         try {
-            name = ObjectName.getInstance(objectName);
+            name = ObjectName.getInstance(connectorName);
         } catch (MalformedObjectNameException e) {
-            throw new IllegalArgumentException("Invalid object name '"+objectName+"': "+e.getMessage());
+            throw new IllegalArgumentException("Invalid object name '"+connectorName +"':
"+e.getMessage());
         }
         try {
             GBeanInfo info = kernel.getGBeanInfo(name);
@@ -178,7 +179,7 @@
                 log.warn("The ConfigurationManager in the kernel does not allow editing");
             }
         } catch (GBeanNotFoundException e) {
-            log.warn("No such GBean '"+objectName+"'"); //todo: what if we want to remove
a failed GBean?
+            log.warn("No such GBean '"+connectorName +"'"); //todo: what if we want to remove
a failed GBean?
         } catch (Exception e) {
             log.error(e);
         }

Modified: geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/web-builder/src/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Sun Mar 12 13:44:50 2006
@@ -16,66 +16,65 @@
  */
 package org.apache.geronimo.web.deployment;
 
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.zip.ZipEntry;
-import java.util.jar.JarFile;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.security.Permission;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.security.jacc.WebRoleRefPermission;
-import javax.security.jacc.WebUserDataPermission;
-import javax.security.jacc.WebResourcePermission;
-
-import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.util.DeploymentUtil;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.xbeans.j2ee.WebAppType;
-import org.apache.geronimo.xbeans.j2ee.ServletMappingType;
-import org.apache.geronimo.xbeans.j2ee.SecurityConstraintType;
-import org.apache.geronimo.xbeans.j2ee.WebResourceCollectionType;
-import org.apache.geronimo.xbeans.j2ee.UrlPatternType;
-import org.apache.geronimo.xbeans.j2ee.HttpMethodType;
-import org.apache.geronimo.xbeans.j2ee.RoleNameType;
-import org.apache.geronimo.xbeans.j2ee.SecurityRoleType;
-import org.apache.geronimo.xbeans.j2ee.FilterMappingType;
-import org.apache.geronimo.xbeans.j2ee.ServletType;
-import org.apache.geronimo.xbeans.j2ee.SecurityRoleRefType;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.ConfigurationAlreadyExistsException;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.ImportType;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.security.util.URLPattern;
+import org.apache.geronimo.xbeans.j2ee.FilterMappingType;
+import org.apache.geronimo.xbeans.j2ee.HttpMethodType;
+import org.apache.geronimo.xbeans.j2ee.RoleNameType;
+import org.apache.geronimo.xbeans.j2ee.SecurityConstraintType;
+import org.apache.geronimo.xbeans.j2ee.SecurityRoleRefType;
+import org.apache.geronimo.xbeans.j2ee.SecurityRoleType;
+import org.apache.geronimo.xbeans.j2ee.ServletMappingType;
+import org.apache.geronimo.xbeans.j2ee.ServletType;
+import org.apache.geronimo.xbeans.j2ee.UrlPatternType;
+import org.apache.geronimo.xbeans.j2ee.WebAppType;
+import org.apache.geronimo.xbeans.j2ee.WebResourceCollectionType;
+
+import javax.security.jacc.WebResourcePermission;
+import javax.security.jacc.WebRoleRefPermission;
+import javax.security.jacc.WebUserDataPermission;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
 
 /**
- * @version $Rev: 384686 $ $Date$
+ * @version $Rev$ $Date$
  */
 public abstract class AbstractWebModuleBuilder implements ModuleBuilder {
-    protected static final ObjectName MANAGED_CONNECTION_FACTORY_PATTERN;
-    private static final ObjectName ADMIN_OBJECT_PATTERN;
-    protected static final ObjectName STATELESS_SESSION_BEAN_PATTERN;
-    protected static final ObjectName STATEFUL_SESSION_BEAN_PATTERN;
-    protected static final ObjectName ENTITY_BEAN_PATTERN;
+    protected static final AbstractNameQuery MANAGED_CONNECTION_FACTORY_PATTERN;
+    private static final AbstractNameQuery ADMIN_OBJECT_PATTERN;
+    protected static final AbstractNameQuery STATELESS_SESSION_BEAN_PATTERN;
+    protected static final AbstractNameQuery STATEFUL_SESSION_BEAN_PATTERN;
+    protected static final AbstractNameQuery ENTITY_BEAN_PATTERN;
     protected final Kernel kernel;
 
     protected AbstractWebModuleBuilder(Kernel kernel) {
@@ -83,15 +82,11 @@
     }
 
     static {
-        try {
-            MANAGED_CONNECTION_FACTORY_PATTERN = ObjectName.getInstance("*:j2eeType=" + NameFactory.JCA_MANAGED_CONNECTION_FACTORY
+  ",*");
-            ADMIN_OBJECT_PATTERN = ObjectName.getInstance("*:j2eeType=" + NameFactory.JCA_ADMIN_OBJECT
+  ",*");
-            STATELESS_SESSION_BEAN_PATTERN = ObjectName.getInstance("*:j2eeType=" + NameFactory.STATELESS_SESSION_BEAN
+  ",*");
-            STATEFUL_SESSION_BEAN_PATTERN = ObjectName.getInstance("*:j2eeType=" + NameFactory.STATEFUL_SESSION_BEAN
+  ",*");
-            ENTITY_BEAN_PATTERN = ObjectName.getInstance("*:j2eeType=" + NameFactory.ENTITY_BEAN
+  ",*");
-        } catch (MalformedObjectNameException e) {
-            throw new RuntimeException(e);
-        }
+        MANAGED_CONNECTION_FACTORY_PATTERN = new AbstractNameQuery(null, Collections.singletonMap(NameFactory.J2EE_TYPE,
NameFactory.JCA_MANAGED_CONNECTION_FACTORY));
+        ADMIN_OBJECT_PATTERN = new AbstractNameQuery(null, Collections.singletonMap(NameFactory.J2EE_TYPE,
NameFactory.JCA_ADMIN_OBJECT));
+        STATELESS_SESSION_BEAN_PATTERN = new AbstractNameQuery(null, Collections.singletonMap(NameFactory.J2EE_TYPE,
NameFactory.STATELESS_SESSION_BEAN));
+        STATEFUL_SESSION_BEAN_PATTERN = new AbstractNameQuery(null, Collections.singletonMap(NameFactory.J2EE_TYPE,
NameFactory.STATEFUL_SESSION_BEAN));
+        ENTITY_BEAN_PATTERN = new AbstractNameQuery(null, Collections.singletonMap(NameFactory.J2EE_TYPE,
NameFactory.ENTITY_BEAN));
 
     }
 
@@ -176,7 +171,7 @@
             Artifact earConfigId = earContext.getConfigID();
             Artifact configId = new Artifact(earConfigId.getGroupId(), earConfigId.getArtifactId()
+ "_" + module.getTargetPath(), earConfigId.getVersion(), "car");
             environment.setConfigId(configId);
-            File configurationDir = null;
+            File configurationDir;
             try {
                 configurationDir = configurationStore.createNewConfigurationDir(environment.getConfigId());
             } catch (ConfigurationAlreadyExistsException e) {

Modified: geronimo/branches/1.1/modules/web-builder/src/schema/geronimo-web-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/web-builder/src/schema/geronimo-web-1.1.xsd?rev=385372&r1=385371&r2=385372&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/web-builder/src/schema/geronimo-web-1.1.xsd (original)
+++ geronimo/branches/1.1/modules/web-builder/src/schema/geronimo-web-1.1.xsd Sun Mar 12 13:44:50
2006
@@ -19,7 +19,7 @@
 <xs:schema
     xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
     targetNamespace="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
-    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
     xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
@@ -27,7 +27,7 @@
     attributeFormDefault="unqualified"
     version="1.0">
 
-    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.0" schemaLocation="geronimo-naming-1.0.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming-1.1" schemaLocation="geronimo-naming-1.1.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/security-1.1" schemaLocation="geronimo-security-1.1.xsd"/>
     <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment-1.1" schemaLocation="geronimo-config-1.1.xsd"/>
 



Mime
View raw message