geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r750233 - in /geronimo/server/branches/2.1/plugins: axis2/axis2-ejb-deployer/ axis2/axis2-ejb-deployer/src/main/plan/ axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/ cxf/cxf-ejb-deployer/ cxf/cxf-ejb-deployer/src/main/...
Date Wed, 04 Mar 2009 23:45:25 GMT
Author: gawor
Date: Wed Mar  4 23:45:24 2009
New Revision: 750233

URL: http://svn.apache.org/viewvc?rev=750233&view=rev
Log:
Don't rely on config substitution properties in ejb jax-ws deployers (GERONIMO-4554)

Modified:
    geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/pom.xml
    geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/src/main/plan/plan.xml
    geronimo/server/branches/2.1/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceGBean.java
    geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/pom.xml
    geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/src/main/plan/plan.xml
    geronimo/server/branches/2.1/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
    geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSEJBModuleBuilderExtension.java

Modified: geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/pom.xml?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/pom.xml Wed Mar  4 23:45:24
2009
@@ -104,16 +104,8 @@
                     </dependencies>
                     <instance>
                         <plugin-artifact>
-                            <config-xml-content server="default" condition="props['org.apache.geronimo.jaxws.provider']
== 'axis2' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName ==
'tomcat6')">
-                                <gbean name="Axis2ModuleBuilderExtension">
-                                    <attribute name="listener">?name=#{webcontainer}</attribute>
-                                </gbean>
-                            </config-xml-content>
-                            <config-xml-content server="offline" condition="props['org.apache.geronimo.jaxws.provider']
== 'axis2' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName ==
'tomcat6')">
-                                <gbean name="Axis2ModuleBuilderExtension">
-                                    <attribute name="listener">?name=#{webcontainer}</attribute>
-                                </gbean>
-                            </config-xml-content>
+                            <config-xml-content server="default" condition="props['org.apache.geronimo.jaxws.provider']
== 'axis2' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName ==
'tomcat6')"/>
+                            <config-xml-content server="offline" condition="props['org.apache.geronimo.jaxws.provider']
== 'axis2' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName ==
'tomcat6')"/>
                         </plugin-artifact>
                     </instance>
                 </configuration>

Modified: geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/src/main/plan/plan.xml?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/axis2/axis2-ejb-deployer/src/main/plan/plan.xml Wed
Mar  4 23:45:24 2009
@@ -35,9 +35,6 @@
     </gbean>
 
    <gbean name="Axis2ModuleBuilderExtension" class="org.apache.geronimo.jaxws.builder.JAXWSEJBModuleBuilderExtension">
-        <!-- This attribute and the environment must be updated appropriately in the config.xml
file -->
-        <attribute name="listener">?name=WebContainer</attribute>
-
         <reference name="WebServiceBuilder">
             <name>Axis2EJBBuilder</name>
         </reference>
@@ -46,6 +43,15 @@
         </reference>
     </gbean>
 
-    <gbean name="Axis2WebServiceEJBLinkTemplate" class="org.apache.geronimo.axis2.ejb.EJBWebServiceGBean"/>
+    <gbean name="Axis2WebServiceEJBLinkTemplate" class="org.apache.geronimo.axis2.ejb.EJBWebServiceGBean">
+        <references name="WebServiceContainer">
+            <pattern>
+                <name>JettyWebContainer</name>
+            </pattern>
+            <pattern>
+                <name>TomcatWebContainer</name>
+            </pattern>
+        </references>
+    </gbean>
 
 </module>

Modified: geronimo/server/branches/2.1/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceGBean.java?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceGBean.java
(original)
+++ geronimo/server/branches/2.1/plugins/axis2/geronimo-axis2-ejb/src/main/java/org/apache/geronimo/axis2/ejb/EJBWebServiceGBean.java
Wed Mar  4 23:45:24 2009
@@ -18,6 +18,7 @@
 package org.apache.geronimo.axis2.ejb;
 
 import java.net.URL;
+import java.util.Collection;
 
 import javax.naming.Context;
 
@@ -44,17 +45,17 @@
                               PortInfo portInfo,                              
                               Kernel kernel,
                               URL configurationBaseUrl,                              
-                              SoapHandler soapHandler,
+                              Collection<SoapHandler> webContainers,
                               String securityRealmName,
                               String realmName,
                               String transportGuarantee,
                               String authMethod,
                               String[] virtualHosts) throws Exception {        
-        if (ejbDeploymentContext == null || soapHandler == null || portInfo == null) {
+        if (ejbDeploymentContext == null || webContainers == null || webContainers.isEmpty()
|| portInfo == null) {
             return;
         }
                 
-        this.soapHandler = soapHandler;
+        this.soapHandler = webContainers.iterator().next();
         this.location = portInfo.getLocation();
         
         assert this.location != null : "null location received";
@@ -69,17 +70,14 @@
                                        context, configurationBaseUrl, deploymnetInfo);
         this.container.init();
          
-        if (soapHandler != null) {
-            soapHandler.addWebService(this.location, 
-                                      virtualHosts, 
-                                      this.container, 
-                                      securityRealmName, 
-                                      realmName, 
-                                      transportGuarantee, 
-                                      authMethod, 
-                                      classLoader);
-        }
-        
+        soapHandler.addWebService(this.location, 
+                                  virtualHosts, 
+                                  this.container, 
+                                  securityRealmName, 
+                                  realmName, 
+                                  transportGuarantee, 
+                                  authMethod, 
+                                  classLoader);
     }
 
     public void doStart() throws Exception {

Modified: geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/pom.xml?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/pom.xml (original)
+++ geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/pom.xml Wed Mar  4 23:45:24
2009
@@ -102,16 +102,8 @@
                     </dependencies>
                     <instance>
                         <plugin-artifact>
-                            <config-xml-content server="default" condition="props['org.apache.geronimo.jaxws.provider']
== 'cxf' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName == 'jetty6')">
-                                <gbean name="CXFModuleBuilderExtension" class="org.apache.geronimo.jaxws.builder.JAXWSEJBModuleBuilderExtension">
-                                    <attribute name="listener">?name=#{webcontainer}</attribute>
-                                </gbean>
-                            </config-xml-content>
-                            <config-xml-content server="offline" condition="props['org.apache.geronimo.jaxws.provider']
== 'cxf' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName == 'jetty6')">
-                                <gbean name="CXFModuleBuilderExtension" class="org.apache.geronimo.jaxws.builder.JAXWSEJBModuleBuilderExtension">
-                                    <attribute name="listener">?name=#{webcontainer}</attribute>
-                                </gbean>
-                            </config-xml-content>
+                            <config-xml-content server="default" condition="props['org.apache.geronimo.jaxws.provider']
== 'cxf' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName == 'jetty6')"/>
+                            <config-xml-content server="offline" condition="props['org.apache.geronimo.jaxws.provider']
== 'cxf' or (props['org.apache.geronimo.jaxws.provider'] == null and webcontainerName == 'jetty6')"/>
                         </plugin-artifact>
                     </instance>
                 </configuration>

Modified: geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/src/main/plan/plan.xml?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/2.1/plugins/cxf/cxf-ejb-deployer/src/main/plan/plan.xml Wed Mar
 4 23:45:24 2009
@@ -35,9 +35,6 @@
     </gbean>
 
     <gbean name="CXFModuleBuilderExtension" class="org.apache.geronimo.jaxws.builder.JAXWSEJBModuleBuilderExtension">
-        <!-- This attribute and the environment must be updated appropriately in the config.xml
file -->
-        <attribute name="listener">?name=WebContainer</attribute>
-
         <reference name="WebServiceBuilder">
             <name>CXFEJBBuilder</name>
         </reference>
@@ -46,6 +43,15 @@
         </reference>
     </gbean>
 
-    <gbean name="CXFWebServiceEJBLinkTemplate" class="org.apache.geronimo.cxf.ejb.EJBWebServiceGBean"/>
+    <gbean name="CXFWebServiceEJBLinkTemplate" class="org.apache.geronimo.cxf.ejb.EJBWebServiceGBean">
+        <references name="WebServiceContainer">
+            <pattern>
+                <name>JettyWebContainer</name>
+            </pattern>
+            <pattern>
+                <name>TomcatWebContainer</name>
+            </pattern>
+        </references>
+    </gbean>
 
 </module>

Modified: geronimo/server/branches/2.1/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
(original)
+++ geronimo/server/branches/2.1/plugins/cxf/geronimo-cxf-ejb/src/main/java/org/apache/geronimo/cxf/ejb/EJBWebServiceGBean.java
Wed Mar  4 23:45:24 2009
@@ -17,6 +17,7 @@
 package org.apache.geronimo.cxf.ejb;
 
 import java.net.URL;
+import java.util.Collection;
 
 import javax.naming.Context;
 
@@ -45,17 +46,17 @@
                               PortInfo portInfo,                              
                               Kernel kernel,
                               URL configurationBaseUrl,                              
-                              SoapHandler soapHandler,
+                              Collection<SoapHandler> webContainers, 
                               String securityRealmName,
                               String realmName,
                               String transportGuarantee,
                               String authMethod,
                               String[] virtualHosts) throws Exception {        
-        if (ejbDeploymentContext == null || soapHandler == null || portInfo == null) {
+        if (ejbDeploymentContext == null || webContainers == null || webContainers.isEmpty()
|| portInfo == null) {
             return;
         }
                 
-        this.soapHandler = soapHandler;
+        this.soapHandler = webContainers.iterator().next();
         this.location = portInfo.getLocation();
         
         assert this.location != null : "null location received";
@@ -75,17 +76,14 @@
         this.container = new EJBWebServiceContainer(bus, configurationBaseUrl, beanClass);
         
         ClassLoader classLoader = ejbDeploymentContext.getClassLoader();
-        if (soapHandler != null) {
-            soapHandler.addWebService(this.location, 
-                                      virtualHosts, 
-                                      this.container, 
-                                      securityRealmName, 
-                                      realmName, 
-                                      transportGuarantee, 
-                                      authMethod, 
-                                      classLoader);
-        }
-        
+        soapHandler.addWebService(this.location, 
+                                  virtualHosts, 
+                                  this.container, 
+                                  securityRealmName, 
+                                  realmName, 
+                                  transportGuarantee, 
+                                  authMethod, 
+                                  classLoader);
     }
 
     public void doStart() throws Exception {

Modified: geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSEJBModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSEJBModuleBuilderExtension.java?rev=750233&r1=750232&r2=750233&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSEJBModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/2.1/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSEJBModuleBuilderExtension.java
Wed Mar  4 23:45:24 2009
@@ -31,6 +31,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilderExtension;
@@ -56,6 +57,7 @@
     protected WebServiceBuilder jaxwsBuilder;
     protected AbstractNameQuery listener;    
     protected GBeanInfo wsGBeanInfo;
+    protected GBeanData wsGBeanData;
     protected Environment defaultEnvironment;
 
     public JAXWSEJBModuleBuilderExtension() throws Exception {
@@ -69,14 +71,12 @@
         this.jaxwsBuilder = wsBuilder;
         this.listener = listener;    
         this.defaultEnvironment = defaultEnvironment;
-        this.wsGBeanInfo = getGBeanInfo(kernel, dataLink);
+        
+        AbstractName webServiceLinkTemplateName = kernel.getAbstractNameFor(dataLink);
+        this.wsGBeanInfo = kernel.getGBeanInfo(webServiceLinkTemplateName);
+        this.wsGBeanData = kernel.getGBeanData(webServiceLinkTemplateName);
     }
     
-    private static GBeanInfo getGBeanInfo(Kernel kernel, Object webServiceLinkTemplate) throws
Exception {
-        AbstractName webServiceLinkTemplateName = kernel.getAbstractNameFor(webServiceLinkTemplate);
-        return kernel.getGBeanInfo(webServiceLinkTemplateName);
-    }
-
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath,
URL specDDUrl, Environment environment, Object moduleContextInfo, AbstractName earName, Naming
naming, ModuleIDBuilder idBuilder) throws DeploymentException {
         if (this.defaultEnvironment != null) {
             EnvironmentBuilder.mergeEnvironments(environment, this.defaultEnvironment);
@@ -175,8 +175,9 @@
                             e);
                 }
                 
-                if (this.listener != null) {
-                    ejbWebServiceGBean.setReferencePattern("WebServiceContainer", this.listener);
+                ReferencePatterns patterns = this.wsGBeanData.getReferencePatterns("WebServiceContainer");
+                if (patterns != null) {
+                    ejbWebServiceGBean.setReferencePatterns("WebServiceContainer", patterns);
                 }
                 
                 ejbWebServiceGBean.setReferencePattern("EjbDeployment", sessionName);



Mime
View raw message