geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: rev 54649 - in geronimo/trunk/modules: client-builder/src/java/org/apache/geronimo/client/builder jetty/src/java/org/apache/geronimo/jetty/deployment naming/src/java/org/apache/geronimo/naming/deployment naming/src/java/org/apache/geronimo/naming/jmx naming/src/schema
Date Tue, 12 Oct 2004 03:05:58 GMT
Author: adc
Date: Mon Oct 11 20:05:57 2004
New Revision: 54649

Modified:
   geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
   geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/RemoteRefDConfigBean.java
   geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java
   geronimo/trunk/modules/naming/src/schema/geronimo-naming.xsd
Log:
Removed the "inheritance" between remote and local resource refs.

Modified: geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
==============================================================================
--- geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/trunk/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Mon Oct 11 20:05:57 2004
@@ -64,6 +64,7 @@
 import org.apache.geronimo.xbeans.geronimo.client.GerDependencyType;
 import org.apache.geronimo.xbeans.geronimo.client.GerGbeanType;
 import org.apache.geronimo.xbeans.geronimo.client.GerResourceType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerLocalRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerRemoteRefType;
 import org.apache.geronimo.xbeans.j2ee.ApplicationClientDocument;
 import org.apache.geronimo.xbeans.j2ee.ApplicationClientType;
@@ -579,6 +580,17 @@
         if (refs != null) {
             for (int i = 0; i < refs.length; i++) {
                 GerRemoteRefType ref = refs[i];
+                refMap.put(ref.getRefName(), ref);
+            }
+        }
+        return refMap;
+    }
+
+    private static Map mapRefs(GerLocalRefType[] refs) {
+        Map refMap = new HashMap();
+        if (refs != null) {
+            for (int i = 0; i < refs.length; i++) {
+                GerLocalRefType ref = refs[i];
                 refMap.put(ref.getRefName(), ref);
             }
         }

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Mon Oct 11 20:05:57 2004
@@ -385,6 +385,17 @@
                 cl);
     }
 
+    private static Map mapRefs(GerLocalRefType[] refs) {
+        Map refMap = new HashMap();
+        if (refs != null) {
+            for (int i = 0; i < refs.length; i++) {
+                GerLocalRefType ref = refs[i];
+                refMap.put(ref.getRefName(), ref);
+            }
+        }
+        return refMap;
+    }
+
     private static Map mapRefs(GerRemoteRefType[] refs) {
         Map refMap = new HashMap();
         if (refs != null) {

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/ENCHelper.java
Mon Oct 11 20:05:57 2004
@@ -58,7 +58,7 @@
     private final String[] xpaths;
     private final String[] namePaths;
 
-    private LocalRefDConfigBean[] ejbRefs;
+    private RemoteRefDConfigBean[] ejbRefs;
 
     private LocalRefDConfigBean[] ejbLocalRefs;
     private LocalRefDConfigBean[] resourceEnvRefs;
@@ -179,7 +179,7 @@
         if (xpath.equals(xpaths[0])) {
             String name = ddBean.getText(namePaths[0])[0];
             for (int i = 0; i < ejbRefs.length; i++) {
-                LocalRefDConfigBean ejbRef = ejbRefs[i];
+                RemoteRefDConfigBean ejbRef = ejbRefs[i];
                 if (ejbRef.getRefName().equals(name)) {
                     return ejbRef;
                 }

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/LocalRefDConfigBean.java
Mon Oct 11 20:05:57 2004
@@ -20,7 +20,8 @@
 import javax.enterprise.deploy.model.DDBean;
 
 import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
-import org.apache.geronimo.xbeans.geronimo.naming.GerRemoteRefType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerLocalRefType;
+
 import org.apache.xmlbeans.SchemaTypeLoader;
 
 /**
@@ -30,9 +31,9 @@
  */
 public class LocalRefDConfigBean extends DConfigBeanSupport {
 
-    protected final GerRemoteRefType ref;
+    protected final GerLocalRefType ref;
 
-    public LocalRefDConfigBean(DDBean ddBean, GerRemoteRefType ref, String namePath) {
+    public LocalRefDConfigBean(DDBean ddBean, GerLocalRefType ref, String namePath) {
         super(ddBean, ref);
         this.ref = ref;
 

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/RemoteRefDConfigBean.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/RemoteRefDConfigBean.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/deployment/RemoteRefDConfigBean.java
Mon Oct 11 20:05:57 2004
@@ -19,7 +19,11 @@
 
 import javax.enterprise.deploy.model.DDBean;
 
+import org.apache.xmlbeans.SchemaTypeLoader;
+
 import org.apache.geronimo.xbeans.geronimo.naming.GerRemoteRefType;
+import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
+
 
 /**
  *
@@ -27,17 +31,47 @@
  * @version $Rev$ $Date$
  *
  * */
-public class RemoteRefDConfigBean extends LocalRefDConfigBean {
+public class RemoteRefDConfigBean extends DConfigBeanSupport {
+
+    protected final GerRemoteRefType ref;
 
     public RemoteRefDConfigBean(DDBean ddBean, GerRemoteRefType ref, String namePath) {
-        super (ddBean, ref, namePath);
+        super(ddBean, ref);
+        this.ref = ref;
+
+        assert ddBean.getChildBean(namePath)[0].getText().equals(getRefName());
+    }
+
+    String getRefName() {
+        return ref.getRefName();
+    }
+
+    public String getExternalUri() {
+        return ref.getExternalUri();
+    }
+
+    public void setExternalUri(String targetURI) {
+        ref.setExternalUri(targetURI);
+    }
+
+
+    public String getKernelName() {
+        return ref.getKernelName();
+    }
+
+    public void setKernelName(String kernelName) {
+        ref.setKernelName(kernelName);
+    }
+
+    public String getTargetName() {
+        return ref.getTargetName();
     }
 
-    public String getServerName() {
-        return ref.getServer();
+    public void setTargetName(String targetName) {
+        ref.setTargetName(targetName);
     }
 
-    public void setServerName(String serverName) {
-        ref.setServer(serverName);
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return ENCHelper.SCHEMA_TYPE_LOADER;
     }
 }

Modified: geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java
==============================================================================
--- geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java
(original)
+++ geronimo/trunk/modules/naming/src/java/org/apache/geronimo/naming/jmx/JMXReferenceFactory.java
Mon Oct 11 20:05:57 2004
@@ -47,7 +47,7 @@
         Reference ref = new Reference(null, JMXObjectFactory.class.getName(), null);
 
         String targetName = localRef.getTargetName();
-        ref.add(new JMXRefAddr(localRef.getServer(), localRef.getKernelName(), createManagedConnectionFactoryObjectName(targetName),
iface));
+        ref.add(new JMXRefAddr(null, localRef.getKernelName(), createManagedConnectionFactoryObjectName(targetName),
iface));
         return ref;
     }
 
@@ -58,7 +58,7 @@
     public Reference buildAdminObjectReference(GerLocalRefType localRef, Class iface) throws
MalformedObjectNameException {
         Reference ref = new Reference(null, JMXObjectFactory.class.getName(), null);
         String targetName = localRef.getTargetName();
-        ref.add(new JMXRefAddr(localRef.getServer(), localRef.getKernelName(), createAdminObjectObjectName(targetName),
iface));
+        ref.add(new JMXRefAddr(null, localRef.getKernelName(), createAdminObjectObjectName(targetName),
iface));
         return ref;
     }
 
@@ -81,7 +81,7 @@
 
     public Reference buildEjbLocalReference(GerLocalRefType localRef, Class iface) throws
MalformedObjectNameException {
         Reference ref = new Reference(null, JMXObjectFactory.class.getName(), null);
-        ref.add(new JMXRefAddr(localRef.getServer(), localRef.getKernelName(), ObjectName.getInstance(localRef.getTargetName()),
iface));
+        ref.add(new JMXRefAddr(null, localRef.getKernelName(), ObjectName.getInstance(localRef.getTargetName()),
iface));
         return ref;
     }
 

Modified: geronimo/trunk/modules/naming/src/schema/geronimo-naming.xsd
==============================================================================
--- geronimo/trunk/modules/naming/src/schema/geronimo-naming.xsd	(original)
+++ geronimo/trunk/modules/naming/src/schema/geronimo-naming.xsd	Mon Oct 11 20:05:57 2004
@@ -80,22 +80,18 @@
     </xsd:complexType>
 
     <xsd:complexType name="local-refType">
-        <xsd:complexContent>
-            <xsd:restriction base="gernaming:remote-refType">
+        <xsd:sequence>
+            <xsd:element name="ref-name" type="xsd:string"/>
+            <xsd:choice>
                 <xsd:sequence>
-                    <xsd:element name="ref-name" type="xsd:string"/>
-                    <xsd:choice>
-                        <xsd:sequence>
-                            <xsd:element name="server" type="xsd:string" minOccurs="0"
maxOccurs="0"/>
-                            <xsd:element name="kernel-name" type="xsd:string" minOccurs="0"/>
-                            <xsd:element name="target-name" type="xsd:string"/>
-                        </xsd:sequence>
-                        <xsd:element name="external-uri" type="xsd:string"/>
-                        <xsd:element name="ejb-link" type="xsd:string"/>
-                    </xsd:choice>
+                    <xsd:element name="kernel-name" type="xsd:string" minOccurs="0"/>
+                    <xsd:element name="target-name" type="xsd:string"/>
                 </xsd:sequence>
-            </xsd:restriction>
-        </xsd:complexContent>
+                <xsd:element name="external-uri" type="xsd:string"/>
+                <xsd:element name="ejb-link" type="xsd:string"/>
+                <xsd:element name="resource-link" type="xsd:string"/>
+            </xsd:choice>
+        </xsd:sequence>
     </xsd:complexType>
 
 </xsd:schema>

Mime
View raw message