Author: jim.ma
Date: 2014-06-19 04:43:26 -0400 (Thu, 19 Jun 2014)
New Revision: 18748
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
Log:
[JBWS-3800]:Only check existence of endpoint config in standalone.xml when it is specified
in annotaion or decriptor
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 2014-06-18
23:47:01 UTC (rev 18747)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-06-19
08:43:26 UTC (rev 18748)
@@ -124,6 +124,7 @@
// 1) default values
String configName =
org.jboss.wsf.spi.metadata.config.EndpointConfig.STANDARD_ENDPOINT_CONFIG;
String configFile = null;
+ boolean specifiedConfig = false;
// 2) annotation contribution
EndpointConfig epConfigAnn =
implementor.getClass().getAnnotation(EndpointConfig.class);
if (epConfigAnn != null)
@@ -136,11 +137,13 @@
{
configFile = epConfigAnn.configFile();
}
+ specifiedConfig = true;
}
// 3) descriptor overrides (jboss-webservices.xml or web.xml)
if (epConfigName != null && !epConfigName.isEmpty())
{
configName = epConfigName;
+ specifiedConfig = true;
}
if (epConfigFile != null && !epConfigFile.isEmpty())
{
@@ -154,6 +157,9 @@
org.jboss.wsf.spi.metadata.config.EndpointConfig config =
sc.getEndpointConfig(configName);
if (config != null) {
endpoint.setEndpointConfig(config);
+ }
+ if (config == null && specifiedConfig) {
+ throw Messages.MESSAGES.couldNotFindEndpointConfigName(configName);
}
}
else
Show replies by date