geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1296084 - in /geronimo/server/branches/3.0-beta/plugins: axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/ axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/ jaxws/geronimo-jaxws-builder/...
Date Fri, 02 Mar 2012 08:37:17 GMT
Author: xuhaihong
Date: Fri Mar  2 08:37:16 2012
New Revision: 1296084

URL: http://svn.apache.org/viewvc?rev=1296084&view=rev
Log:
GERONIMO-5813 name-value configuration entry for the deployment scope

Modified:
    geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
    geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
    geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
    geronimo/server/branches/3.0-beta/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
    geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
    geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
    geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
    geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
    geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
    geronimo/server/branches/3.0-beta/plugins/wink/geronimo-wink-builder/src/main/java/org/apache/geronimo/wink/deployment/WinkModuleBuilderExtension.java

Modified: geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisBuilder.java
Fri Mar  2 08:37:16 2012
@@ -102,6 +102,15 @@ public class AxisBuilder implements WebS
 
     private static final SOAPConstants SOAP_VERSION = SOAPConstants.SOAP11_CONSTANTS;
 
+    private static final boolean JAX_RPC_SERVER_SUPPORT;
+    static {
+        String webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.server.support");
+        if (webServiceServerSupported == null) {
+            webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.support");
+        }
+        JAX_RPC_SERVER_SUPPORT = webServiceServerSupported == null ? true : Boolean.valueOf(webServiceServerSupported);
+    }
+
     private final Environment defaultEnvironment;
     private static final String KEY = AxisBuilder.class.getName();
 
@@ -111,6 +120,10 @@ public class AxisBuilder implements WebS
 
     @Override
     public void findWebServices(Module module, boolean isEJB, Map servletLocations, Environment
environment, Map sharedContext) throws DeploymentException {
+        if (!JAX_RPC_SERVER_SUPPORT) {
+            return;
+        }
+
         final String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
 
         URL wsDDUrl = module.getDeployable().getResource(path);
@@ -130,6 +143,9 @@ public class AxisBuilder implements WebS
 
     @Override
     public boolean configurePOJO(GBeanData targetGBean, String servletName, Module module,
String servletClassName, DeploymentContext context) throws DeploymentException {
+        if (!JAX_RPC_SERVER_SUPPORT) {
+            return false;
+        }
         Map sharedContext = ((WebModule) module).getSharedContext();
         Map<String, PortInfo> portInfoMap = (Map<String, PortInfo>) sharedContext.get(KEY);
 
@@ -203,6 +219,10 @@ public class AxisBuilder implements WebS
     @Override
     public boolean configureEJB(GBeanData targetGBean, String ejbName, Module module, Map
sharedContext, Bundle bundle) throws DeploymentException {
 
+        if (!JAX_RPC_SERVER_SUPPORT) {
+            return false;
+        }
+
         if (sharedContext.get(KEY) == null){
             return false;
         }

Modified: geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisModuleBuilderExtension.java
Fri Mar  2 08:37:16 2012
@@ -69,6 +69,15 @@ import org.osgi.framework.Bundle;
  */
 public class AxisModuleBuilderExtension implements ModuleBuilderExtension {
 
+    private static final boolean JAX_RPC_SERVER_SUPPORT;
+    static {
+        String webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.server.support");
+        if (webServiceServerSupported == null) {
+            webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.support");
+        }
+        JAX_RPC_SERVER_SUPPORT = webServiceServerSupported == null ? true : Boolean.valueOf(webServiceServerSupported);
+    }
+
     private WebServiceBuilder axisBuilder;
     private Environment defaultEnvironment;
     private AbstractNameQuery listener;
@@ -90,7 +99,7 @@ public class AxisModuleBuilderExtension 
 
     @Override
     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 (module.getType() != ConfigurationModuleType.EJB) {
+        if (module.getType() != ConfigurationModuleType.EJB || !JAX_RPC_SERVER_SUPPORT) {
             return;
         }
 
@@ -123,7 +132,7 @@ public class AxisModuleBuilderExtension 
 
     @Override
     public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{
-        if (module.getType() != ConfigurationModuleType.EJB) {
+        if (module.getType() != ConfigurationModuleType.EJB || !JAX_RPC_SERVER_SUPPORT) {
             return;
         }
 
@@ -191,7 +200,7 @@ public class AxisModuleBuilderExtension 
 
     @Override
     public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
collection) throws DeploymentException {
-        if (module.getType() != ConfigurationModuleType.EJB) {
+        if (module.getType() != ConfigurationModuleType.EJB || !JAX_RPC_SERVER_SUPPORT) {
             return;
         }
 

Modified: geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/axis/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
Fri Mar  2 08:37:16 2012
@@ -64,6 +64,15 @@ public class AxisServiceRefBuilder exten
     private static final QName GER_SERVICE_REF_QNAME = GerServiceRefDocument.type.getDocumentElementName();
     private static final QNameSet GER_SERVICE_REF_QNAME_SET = QNameSet.singleton(GER_SERVICE_REF_QNAME);
 
+    private static final boolean JAX_RPC_CLIENT_SUPPORT;
+    static {
+        String webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.client.support");
+        if (webServiceServerSupported == null) {
+            webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxrpc.support");
+        }
+        JAX_RPC_CLIENT_SUPPORT = webServiceServerSupported == null ? true : Boolean.valueOf(webServiceServerSupported);
+    }
+
     private final AxisBuilder axisBuilder;
 
     public AxisServiceRefBuilder(@ParamAttribute(name = "defaultEnvironment") Environment
defaultEnvironment,
@@ -108,6 +117,9 @@ public class AxisServiceRefBuilder exten
 
     @Override
     public void buildNaming(ServiceRef serviceRef, GerServiceRefType gerServiceRefType, Module
module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
+        if (!JAX_RPC_CLIENT_SUPPORT) {
+            return;
+        }
         //TODO name needs to be normalized or get normalized name from jee's map.
         String name = serviceRef.getKey();
         Bundle bundle = module.getEarContext().getDeploymentBundle();

Modified: geronimo/server/branches/3.0-beta/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/axis2/geronimo-axis2-builder/src/main/java/org/apache/geronimo/axis2/builder/Axis2Builder.java
Fri Mar  2 08:37:16 2012
@@ -54,7 +54,7 @@ public class Axis2Builder extends JAXWSS
 
     private static final Logger log = LoggerFactory.getLogger(Axis2Builder.class);
 
-    private static final boolean ignoreEmptyWebServiceProviderWSDL = Boolean.getBoolean("org.apache.geronimo.webservice.provider.wsdl.ignore");
+    private static final boolean ignoreEmptyWebServiceProviderWSDL = Boolean.getBoolean("org.apache.geronimo.webservice.provider.wsdl.ignore");
       
 
     protected Collection<WsdlGenerator> wsdlGenerators;
 

Modified: geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceBuilder.java
Fri Mar  2 08:37:16 2012
@@ -66,6 +66,16 @@ import org.slf4j.LoggerFactory;
 public abstract class JAXWSServiceBuilder implements WebServiceBuilder {
 
     private static final Logger LOG = LoggerFactory.getLogger(JAXWSServiceBuilder.class);
+    
+    private static final boolean JAX_WS_SERVER_SUPPORT;
+    
+    static {
+        String webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxws.server.support");
+        if (webServiceServerSupported == null) {
+            webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxws.support");
+        }
+        JAX_WS_SERVER_SUPPORT = webServiceServerSupported == null ? true : Boolean.valueOf(webServiceServerSupported);
+    }
 
     private HandlerChainsInfoBuilder handlerChainsInfoBuilder = new HandlerChainsInfoBuilder();
 
@@ -86,6 +96,9 @@ public abstract class JAXWSServiceBuilde
 
     @Override
     public void findWebServices(Module module, boolean isEJB, Map<String, String> servletLocations,
Environment environment, Map sharedContext) throws DeploymentException {
+        if (!JAX_WS_SERVER_SUPPORT) {
+            return;
+        }
         Map<String, PortInfo> serviceLinkPortInfoMap = discoverWebServices(module,
isEJB, servletLocations);
         String path = isEJB ? "META-INF/webservices.xml" : "WEB-INF/webservices.xml";
         Deployable deployable = module.getDeployable();
@@ -238,6 +251,9 @@ public abstract class JAXWSServiceBuilde
                                  String servletClassName,
                                  DeploymentContext context)
             throws DeploymentException {
+        if (!JAX_WS_SERVER_SUPPORT) {
+            return false;
+        }
         Map sharedContext = ((WebModule) module).getSharedContext();
         Map<String, PortInfo> portInfoMap = (Map<String, PortInfo>) sharedContext.get(getKey());
         if (portInfoMap == null) {
@@ -331,6 +347,9 @@ public abstract class JAXWSServiceBuilde
                                 Map sharedContext,
                                 Bundle bundle)
             throws DeploymentException {
+        if (!JAX_WS_SERVER_SUPPORT) {
+            return false;
+        }
         Map<String, PortInfo> portInfoMap = (Map<String, PortInfo>) sharedContext.get(getKey());
         if (portInfoMap == null) {
             // not ours

Modified: geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
Fri Mar  2 08:37:16 2012
@@ -49,12 +49,20 @@ import org.slf4j.LoggerFactory;
 public abstract class JAXWSServiceRefBuilder extends AbstractNamingBuilder implements ServiceRefBuilder
{
     private static final Logger log = LoggerFactory.getLogger(JAXWSServiceRefBuilder.class);
 
-    private static final QName GER_SERVICE_REF_QNAME =
-        GerServiceRefDocument.type.getDocumentElementName();
+    private static final QName GER_SERVICE_REF_QNAME = GerServiceRefDocument.type.getDocumentElementName();
 
-    private static final QNameSet GER_SERVICE_REF_QNAME_SET =
-        QNameSet.singleton(GER_SERVICE_REF_QNAME);
+    private static final QNameSet GER_SERVICE_REF_QNAME_SET = QNameSet.singleton(GER_SERVICE_REF_QNAME);
 
+    private static final boolean JAX_WS_CLIENT_SUPPORT;
+    
+    static {
+        String webServiceClientSupported = System.getProperty("org.apache.geronimo.jaxws.client.support");
+        if (webServiceClientSupported == null) {
+            webServiceClientSupported = System.getProperty("org.apache.geronimo.jaxws.support");
+        }
+        JAX_WS_CLIENT_SUPPORT = webServiceClientSupported == null ? true : Boolean.valueOf(webServiceClientSupported);
+    }
+    
     private final QNameSet serviceRefQNameSet;
 
     protected HandlerChainsInfoBuilder handlerChainsInfoBuilder = new HandlerChainsInfoBuilder();
@@ -74,6 +82,9 @@ public abstract class JAXWSServiceRefBui
             XmlObject plan,
             Module module,
             Map<EARContext.Key, Object> componentContext) throws DeploymentException
{
+        if (!JAX_WS_CLIENT_SUPPORT) {
+            return;
+        }
         Collection<ServiceRef> serviceRefsUntyped = specDD.getServiceRef();
         XmlObject[] gerServiceRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_SERVICE_REF_QNAME_SET);
         Map<String, GerServiceRefType> serviceRefMap = mapServiceRefs(gerServiceRefsUntyped);
@@ -99,6 +110,10 @@ public abstract class JAXWSServiceRefBui
 
     @Override
     public void buildNaming(ServiceRef serviceRef, GerServiceRefType gerServiceRef, Module
module, Map<EARContext.Key, Object> sharedContext) throws DeploymentException {
+        if (!JAX_WS_CLIENT_SUPPORT) {
+            return;
+        }
+        
         Bundle bundle = module.getEarContext().getDeploymentBundle();
         //TODO normalize or use normalized name from jee's map
         String name = serviceRef.getKey();

Modified: geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/jaxws/geronimo-jaxws-ejb-builder/src/main/java/org/apache/geronimo/jaxws/ejb/builder/JAXWSEJBModuleBuilderExtension.java
Fri Mar  2 08:37:16 2012
@@ -74,6 +74,15 @@ public class JAXWSEJBModuleBuilderExtens
     protected GBeanData wsGBeanData;
     protected Environment defaultEnvironment;
 
+    private static final boolean JAX_WS_SERVER_SUPPORT;
+    static {
+        String webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxws.server.support");
+        if (webServiceServerSupported == null) {
+            webServiceServerSupported = System.getProperty("org.apache.geronimo.jaxws.support");
+        }
+        JAX_WS_SERVER_SUPPORT = webServiceServerSupported == null ? true : Boolean.valueOf(webServiceServerSupported);
+    }
+    
     public JAXWSEJBModuleBuilderExtension() throws Exception {
     }
 
@@ -95,7 +104,7 @@ public class JAXWSEJBModuleBuilderExtens
     }
 
     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) {
+        if (this.defaultEnvironment != null && JAX_WS_SERVER_SUPPORT) {
             EnvironmentBuilder.mergeEnvironments(environment, this.defaultEnvironment);
         }
     }
@@ -103,8 +112,8 @@ public class JAXWSEJBModuleBuilderExtens
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores, ConfigurationStore targetConfigurationStore, Collection repository) throws
DeploymentException {
     }
 
-    public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{
-        if (module.getType() != ConfigurationModuleType.EJB) {
+    public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{        
+        if (module.getType() != ConfigurationModuleType.EJB || !JAX_WS_SERVER_SUPPORT) {
             return;
         }
 
@@ -184,7 +193,7 @@ public class JAXWSEJBModuleBuilderExtens
     }
 
     public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
repository) throws DeploymentException {
-        if (module.getType() != ConfigurationModuleType.EJB) {
+        if (module.getType() != ConfigurationModuleType.EJB || !JAX_WS_SERVER_SUPPORT) {
             return;
         }
 

Modified: geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
Fri Mar  2 08:37:16 2012
@@ -105,13 +105,15 @@ public class MyFacesModuleBuilderExtensi
 
     private static final Logger log = LoggerFactory.getLogger(MyFacesModuleBuilderExtension.class);
 
-    private final Environment defaultEnvironment;
+    private static final String CONTEXT_LISTENER_NAME = GeronimoStartupServletContextListener.class.getName();
 
-    private final NamingBuilder namingBuilders;
+    private static final String FACES_SERVLET_NAME = FacesServlet.class.getName();      
  
+    
+    private static final boolean JSF_SUPPORT = Boolean.valueOf(System.getProperty("org.apache.geronimo.jsf.support",
"true"));
 
-    private static final String CONTEXT_LISTENER_NAME = GeronimoStartupServletContextListener.class.getName();
+    private final Environment defaultEnvironment;
 
-    private static final String FACES_SERVLET_NAME = FacesServlet.class.getName();
+    private final NamingBuilder namingBuilders;    
 
     private FacesConfigDigester defaultFacesConfigUnmarshaller = new FacesConfigDigester();
 
@@ -141,11 +143,17 @@ public class MyFacesModuleBuilderExtensi
     }
 
     public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+        if (!JSF_SUPPORT) {
+            return;
+        }
         mergeEnvironment(module);
     }
 
     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 (!JSF_SUPPORT) {
+            return;
+        }
         mergeEnvironment(module);
     }
 
@@ -164,17 +172,23 @@ public class MyFacesModuleBuilderExtensi
 
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores, ConfigurationStore targetConfigurationStore, Collection repository)
             throws DeploymentException {
-        if (!(module instanceof WebModule)) {
+        if (!(module instanceof WebModule) || !JSF_SUPPORT) {
             return;
         }
     }
 
     public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{
+        if (!JSF_SUPPORT) {
+            return;
+        }
         module.getEarContext().getGeneralData().put(JSF_META_INF_CONFIGURATION_RESOURCES,
findMetaInfConfigurationResources(earContext, module, bundle));
         module.getEarContext().getGeneralData().put(JSF_FACELET_CONFIG_RESOURCES, findFaceletConfigResources(earContext,
module, bundle));
     }
 
     public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
repository) throws DeploymentException {
+        if (!JSF_SUPPORT) {
+            return;
+        }
         if (!(module instanceof WebModule)) {
             //not a web module, nothing to do
             return;

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Fri Mar  2 08:37:16 2012
@@ -184,7 +184,9 @@ public class EjbModuleBuilder implements
     private static final Logger log = LoggerFactory.getLogger(EjbModuleBuilder.class);
     
     private static final String DEFAULT_BUNDLE_CLASSPATH = ".";
-
+    
+    private static final boolean EJB_SERVER_SUPPORT;
+    
     private static final String OPENEJBJAR_NAMESPACE = XmlUtil.OPENEJBJAR_QNAME.getNamespaceURI();
     private static final Map<String, String> NAMESPACE_UPDATES = new HashMap<String,
String>();
     static {
@@ -194,6 +196,12 @@ public class EjbModuleBuilder implements
         NAMESPACE_UPDATES.put("http://www.openejb.org/xml/ns/openejb-jar-2.3", "http://openejb.apache.org/xml/ns/openejb-jar-2.3");
         NAMESPACE_UPDATES.put("http://www.openejb.org/xml/ns/pkgen", "http://openejb.apache.org/xml/ns/pkgen-2.1");
         NAMESPACE_UPDATES.put("http://www.openejb.org/xml/ns/pkgen-2.0", "http://openejb.apache.org/xml/ns/pkgen-2.1");
+        
+        String ejbServerSupported = System.getProperty("org.apache.geronimo.ejb.server.support");
+        if(ejbServerSupported == null) {
+            ejbServerSupported = System.getProperty("org.apache.geronimo.ejb.support");
+        }
+        EJB_SERVER_SUPPORT = ejbServerSupported == null ? true : Boolean.valueOf(ejbServerSupported);
     }
 
     private final Environment defaultEnvironment;
@@ -268,17 +276,23 @@ public class EjbModuleBuilder implements
     }
 
     @Override
-    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws
DeploymentException {
+    public Module createModule(Bundle bundle, Naming naming, ModuleIDBuilder idBuilder) throws
DeploymentException {        
         return null;
     }
 
     @Override
     public Module createModule(File plan, JarFile moduleFile, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+        if (!EJB_SERVER_SUPPORT) {
+            return null;
+        }
         return createModule(plan, moduleFile, "ejb.jar", null, null, null, naming, idBuilder,
"META-INF/", false);
     }
 
     @Override
     public Module createModule(Object plan, JarFile moduleFile, String targetPath, URL specDDUrl,
Environment environment, Object moduleContextInfo, Module parentModule, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+        if (!EJB_SERVER_SUPPORT) {
+            return null;
+        }
         return createModule(plan, moduleFile, targetPath, specDDUrl, environment, parentModule,
naming, idBuilder, "META-INF/", false);
     }
 
@@ -300,6 +314,9 @@ public class EjbModuleBuilder implements
                              AbstractName earName,
                              Naming naming,
                              ModuleIDBuilder idBuilder) throws DeploymentException {
+        if (!EJB_SERVER_SUPPORT) {
+            return;
+        }
         //check for web module
         if (module instanceof WebModule || module instanceof AppClientModule) {
             //check for WEB-INF/ejb-jar.xml

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbRefBuilder.java
Fri Mar  2 08:37:16 2012
@@ -72,6 +72,16 @@ import org.slf4j.LoggerFactory;
 public class EjbRefBuilder extends AbstractNamingBuilder {
     private static final Logger log = LoggerFactory.getLogger(EjbRefBuilder.class);
 
+    private static final boolean EJB_CLIENT_SUPPORT;
+    
+    static {
+        String ejbClientSupported = System.getProperty("org.apache.geronimo.ejb.client.support");
+        if (ejbClientSupported == null) {
+            ejbClientSupported = System.getProperty("org.apache.geronimo.ejb.support");
+        }
+        EJB_CLIENT_SUPPORT = ejbClientSupported == null ? true : Boolean.valueOf(ejbClientSupported);
+    }
+    
     private final QNameSet ejbRefQNameSet;
     private final QNameSet ejbLocalRefQNameSet;
     private final URI uri;
@@ -97,7 +107,7 @@ public class EjbRefBuilder extends Abstr
         return QNameSet.EMPTY;
     }
 
-    protected boolean willMergeEnvironment(JndiConsumer specDD, XmlObject plan) {
+    protected boolean willMergeEnvironment(JndiConsumer specDD, XmlObject plan) throws DeploymentException
{
         return !specDD.getEjbRef().isEmpty() || !specDD.getEjbLocalRef().isEmpty();
     }
 
@@ -106,7 +116,9 @@ public class EjbRefBuilder extends Abstr
 //        if (module.getType() == ConfigurationModuleType.EJB) {
 //            return;
 //        }
-
+        if (!EJB_CLIENT_SUPPORT) {
+            return;
+        }
         // map the refs declared in the vendor plan, so we can match them to the spec references
         //TODO how do we tell openejb about these?
         Map<String, GerEjbRefType> refMap = mapEjbRefs(plan);

Modified: geronimo/server/branches/3.0-beta/plugins/wink/geronimo-wink-builder/src/main/java/org/apache/geronimo/wink/deployment/WinkModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/wink/geronimo-wink-builder/src/main/java/org/apache/geronimo/wink/deployment/WinkModuleBuilderExtension.java?rev=1296084&r1=1296083&r2=1296084&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/wink/geronimo-wink-builder/src/main/java/org/apache/geronimo/wink/deployment/WinkModuleBuilderExtension.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/wink/geronimo-wink-builder/src/main/java/org/apache/geronimo/wink/deployment/WinkModuleBuilderExtension.java
Fri Mar  2 08:37:16 2012
@@ -74,6 +74,8 @@ import org.slf4j.LoggerFactory;
 public class WinkModuleBuilderExtension implements ModuleBuilderExtension {
 
     private static final Logger log = LoggerFactory.getLogger(WinkModuleBuilderExtension.class);
+    
+    private static final boolean JAX_RS_SUPPORT = Boolean.valueOf(System.getProperty("org.apache.geronimo.jaxrs.support",
"true"));
 
     private final Environment defaultEnvironment;
 
@@ -106,12 +108,17 @@ public class WinkModuleBuilderExtension 
     }
 
     public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder
idBuilder) throws DeploymentException {
+        if (!JAX_RS_SUPPORT) {
+            return;
+        }
         mergeEnvironment(module);
     }
 
     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 (!JAX_RS_SUPPORT) {
+            return;
+        }
         mergeEnvironment(module);
     }
 
@@ -125,15 +132,15 @@ public class WinkModuleBuilderExtension 
 
     public void installModule(JarFile earFile, EARContext earContext, Module module, Collection
configurationStores, ConfigurationStore targetConfigurationStore, Collection repository)
             throws DeploymentException {
-        if (!(module instanceof WebModule)) {
+        if (!(module instanceof WebModule) || !JAX_RS_SUPPORT) {
             return;
         }
     }
 
     @SuppressWarnings("unchecked")
     public void initContext(EARContext earContext, Module module, Bundle bundle) throws DeploymentException
{
-
-        if (!(module instanceof WebModule)) {
+        
+        if (!(module instanceof WebModule) || !JAX_RS_SUPPORT) {
             // not a web module, nothing to do
             return;
         }
@@ -279,7 +286,9 @@ public class WinkModuleBuilderExtension 
     }
 
     public void addGBeans(EARContext earContext, Module module, Bundle bundle, Collection
repository) throws DeploymentException {
-
+        if (!JAX_RS_SUPPORT) {
+            return;
+        }
     }
 
     protected ClassFinder createWinkClassFinder(List<FacesConfig> facesConfigs, Set<Class<?>>
annotatedJAXRSClasses, Bundle bundle) throws DeploymentException {
@@ -317,6 +326,6 @@ public class WinkModuleBuilderExtension 
             }
         }
         return false;
-    }
+    }    
 
 }



Mime
View raw message