JBossWS SVN: r14528 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 14:41:29 -0400 (Sat, 11 Jun 2011)
New Revision: 14528
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
Log:
[JBWS-3286][JBWS-3282] Do not force deployment failure on exception in creating handler from domain config and try ASIL classloader too for getting instances of handlers
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java 2011-06-11 16:38:28 UTC (rev 14527)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/EndpointImpl.java 2011-06-11 18:41:29 UTC (rev 14528)
@@ -37,6 +37,8 @@
import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
import org.apache.cxf.service.Service;
import org.jboss.logging.Logger;
+import org.jboss.ws.common.utils.DelegateClassLoader;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.metadata.config.CommonConfig;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
@@ -135,14 +137,17 @@
Logger.getLogger(this.getClass()).warn("Init params not supported.");
}
Object h = newInstance(uhmd.getHandlerClass());
- if (h instanceof Handler)
+ if (h != null)
{
- handlers.add((Handler)h);
+ if (h instanceof Handler)
+ {
+ handlers.add((Handler)h);
+ }
+ else
+ {
+ throw new RuntimeException(h + " is not a JAX-WS Handler instance!");
+ }
}
- else
- {
- throw new RuntimeException(h + " is not a JAX-WS Handler instance!");
- }
}
}
}
@@ -153,12 +158,15 @@
{
try
{
- Class<?> clazz = SecurityActions.getContextClassLoader().loadClass(className);
+ ClassLoader loader = new DelegateClassLoader(ClassLoaderProvider.getDefaultProvider()
+ .getServerIntegrationClassLoader(), SecurityActions.getContextClassLoader());
+ Class<?> clazz = loader.loadClass(className);
return clazz.newInstance();
}
catch (Exception e)
{
- throw new RuntimeException(e);
+ Logger.getLogger(EndpointImpl.class).warnf(e, "Could not add handler '%s' as part of endpoint configuration", className);
+ return null;
}
}
13 years, 6 months
JBossWS SVN: r14527 - spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 12:38:28 -0400 (Sat, 11 Jun 2011)
New Revision: 14527
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
Log:
[JBWS-3286] Remove whitespaces from default endpoint config name, as that ends up being part of the AS7 domain operation address, which does not support spaces
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2011-06-11 08:53:24 UTC (rev 14526)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2011-06-11 16:38:28 UTC (rev 14527)
@@ -29,5 +29,5 @@
*/
public class EndpointConfig extends AbstractCommonConfig
{
- public static final String STANDARD_ENDPOINT_CONFIG = "Standard Endpoint Config";
+ public static final String STANDARD_ENDPOINT_CONFIG = "Standard-Endpoint-Config";
}
13 years, 6 months
JBossWS SVN: r14526 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 04:53:24 -0400 (Sat, 11 Jun 2011)
New Revision: 14526
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
Log:
[JBWS-3286] Updating ServerBeanCustomizer to get endpoint config from ServerConfig; this includes/improves changes by Jim Ma in JBWS-3286 branch
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2011-06-11 08:34:31 UTC (rev 14525)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2011-06-11 08:53:24 UTC (rev 14526)
@@ -26,8 +26,13 @@
import org.apache.cxf.frontend.ServerFactoryBean;
import org.jboss.ws.api.annotation.EndpointConfig;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.config.ConfigMetaDataParser;
import org.jboss.wsf.spi.metadata.config.ConfigRoot;
import org.jboss.wsf.stack.cxf.AbstractInvoker;
@@ -42,6 +47,8 @@
*/
public class ServerBeanCustomizer extends BeanCustomizer
{
+ private static ServerConfig serverConfig;
+
private WSDLFilePublisher wsdlPublisher;
private List<Endpoint> depEndpoints;
@@ -90,24 +97,62 @@
{
Object implementor = endpoint.getImplementor();
EndpointConfig epConfig = implementor.getClass().getAnnotation(EndpointConfig.class);
+
+ String configName = org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG;
+ String configFile = null;
if (epConfig != null)
{
- String configFile = epConfig.configFile();
+ if (!epConfig.configName().isEmpty())
+ {
+ configName = epConfig.configName();
+ }
+ if (!epConfig.configFile().isEmpty())
+ {
+ configFile = epConfig.configFile();
+ }
+ }
+
+ if (configFile == null)
+ {
+ //use endpoint configs from AS domain
+ ServerConfig sc = getServerConfig();
+ for (org.jboss.wsf.spi.metadata.config.EndpointConfig config : sc.getEndpointConfigs())
+ {
+ if (config.getConfigName().equals(configName))
+ {
+ endpoint.setEndpointConfig(config);
+ break;
+ }
+ }
+ }
+ else
+ {
+ //look for provided endpoint config file
try
{
UnifiedVirtualFile vf = deploymentRoot.findChild(configFile);
ConfigRoot config = ConfigMetaDataParser.parse(vf.toURL());
- endpoint.setEndpointConfig(config.getEndpointConfigByName(epConfig.configName()));
+ endpoint.setEndpointConfig(config.getEndpointConfigByName(configName));
}
catch (IOException e)
{
- throw new RuntimeException("Could not find " + configFile);
+ throw new RuntimeException("Could not read from config file: " + configFile);
}
- //TODO [JBWS-3286] use default endpoint configuration as a fallback
}
}
}
+ private static synchronized ServerConfig getServerConfig()
+ {
+ if (serverConfig == null)
+ {
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ serverConfig = spiProvider.getSPI(ServerConfigFactory.class, cl).getServerConfig();
+ }
+ return serverConfig;
+ }
+
public void setDeploymentRoot(UnifiedVirtualFile deploymentRoot)
{
this.deploymentRoot = deploymentRoot;
13 years, 6 months
JBossWS SVN: r14525 - spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 04:34:31 -0400 (Sat, 11 Jun 2011)
New Revision: 14525
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
Log:
[JBWS-3286] Adding default endpoint config name
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2011-06-11 08:05:11 UTC (rev 14524)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2011-06-11 08:34:31 UTC (rev 14525)
@@ -29,4 +29,5 @@
*/
public class EndpointConfig extends AbstractCommonConfig
{
+ public static final String STANDARD_ENDPOINT_CONFIG = "Standard Endpoint Config";
}
13 years, 6 months
JBossWS SVN: r14524 - in stack/native/trunk/modules: testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 04:05:11 -0400 (Sat, 11 Jun 2011)
New Revision: 14524
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
Log:
[JBWS-3286] Updates due to changes in spi
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2011-06-11 08:03:51 UTC (rev 14523)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerConfig.java 2011-06-11 08:05:11 UTC (rev 14524)
@@ -23,9 +23,11 @@
import java.io.File;
import java.net.UnknownHostException;
+import java.util.List;
import org.jboss.ws.WSException;
import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
/**
* Netty HTTP server config that configures user temp
@@ -194,4 +196,16 @@
throw new UnsupportedOperationException();
}
+ @Override
+ public void addEndpointConfig(EndpointConfig config)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<EndpointConfig> getEndpointConfigs()
+ {
+ throw new UnsupportedOperationException();
+ }
+
}
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java 2011-06-11 08:03:51 UTC (rev 14523)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/common/config/WSDLRequestHandlerTestCase.java 2011-06-11 08:05:11 UTC (rev 14524)
@@ -26,12 +26,14 @@
import java.io.InputStream;
import java.net.URL;
import java.net.UnknownHostException;
+import java.util.List;
import javax.xml.namespace.QName;
import org.jboss.ws.core.server.WSDLRequestHandler;
import org.jboss.ws.common.DOMUtils;
import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
import org.jboss.wsf.test.JBossWSTest;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -251,6 +253,19 @@
return null;
}
+ @Override
+ public void addEndpointConfig(EndpointConfig config)
+ {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ public List<EndpointConfig> getEndpointConfigs()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
}
13 years, 6 months
JBossWS SVN: r14523 - common/trunk/src/main/java/org/jboss/ws/common/management.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 04:03:51 -0400 (Sat, 11 Jun 2011)
New Revision: 14523
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3286] Adding endpoint config methods to abstract server config
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-06-11 08:02:53 UTC (rev 14522)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-06-11 08:03:51 UTC (rev 14523)
@@ -24,6 +24,8 @@
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Set;
import javax.management.AttributeNotFoundException;
@@ -39,6 +41,7 @@
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.StackConfig;
import org.jboss.wsf.spi.management.StackConfigFactory;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
/**
* Basic implementation of a ServerConfig
@@ -70,6 +73,8 @@
private boolean modifySOAPAddress;
//The stack config
protected StackConfig stackConfig;
+ // The default endpoint configs, if any
+ private final List<EndpointConfig> endpointConfigs = new ArrayList<EndpointConfig>();
public MBeanServer getMbeanServer()
{
@@ -241,4 +246,14 @@
{
return stackConfig.getImplementationVersion();
}
+
+ public void addEndpointConfig(EndpointConfig config)
+ {
+ this.endpointConfigs.add(config);
+ }
+
+ public List<EndpointConfig> getEndpointConfigs()
+ {
+ return this.endpointConfigs;
+ }
}
13 years, 6 months
JBossWS SVN: r14522 - in spi/trunk: src/main/java/org/jboss/wsf/spi/management and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 04:02:53 -0400 (Sat, 11 Jun 2011)
New Revision: 14522
Modified:
spi/trunk/
spi/trunk/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
Log:
[JBWS-3286] svn merge -r 14505:14506 https://svn.jboss.org/repos/jbossws/spi/branches/JBWS-3286 .
Property changes on: spi/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /spi/branches/asoldano:14017-14042
+ /spi/branches/JBWS-3286:14506
/spi/branches/asoldano:14017-14042
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2011-06-11 07:24:35 UTC (rev 14521)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2011-06-11 08:02:53 UTC (rev 14522)
@@ -23,7 +23,10 @@
import java.io.File;
import java.net.UnknownHostException;
+import java.util.List;
+import org.jboss.wsf.spi.metadata.config.EndpointConfig;
+
/**
* Interface to container independent config
*
@@ -60,4 +63,8 @@
boolean isModifySOAPAddress();
void setModifySOAPAddress(boolean flag);
+
+ void addEndpointConfig(EndpointConfig config);
+
+ List<EndpointConfig> getEndpointConfigs();
}
13 years, 6 months
JBossWS SVN: r14521 - in spi: tags and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 03:24:35 -0400 (Sat, 11 Jun 2011)
New Revision: 14521
Added:
spi/tags/jbossws-spi-2.0.0.Beta4/
Removed:
spi/branches/JBWS-3125/
Log:
Tagging jbossws-spi-2.0.0.Beta4
13 years, 6 months
JBossWS SVN: r14520 - in common: tags and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-06-11 03:23:36 -0400 (Sat, 11 Jun 2011)
New Revision: 14520
Added:
common/tags/jbossws-common-2.0.0.Beta3/
Removed:
common/branches/JBWS-3125/
Log:
Tagging jbossws-common-2.0.0.Beta3
13 years, 6 months