Author: asoldano
Date: 2015-06-10 16:48:15 -0400 (Wed, 10 Jun 2015)
New Revision: 19784
Modified:
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3911] Validate value of wsdl-path-rewrite-rule when setting it
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 2015-06-10
20:47:54 UTC (rev 19783)
+++
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2015-06-10
20:48:15 UTC (rev 19784)
@@ -283,6 +283,10 @@
public void setWebServicePathRewriteRule(String path, UpdateCallbackHandler uch)
{
+ if (path != null) {
+ setStackConfig();
+ stackConfig.validatePathRewriteRule(path);
+ }
synchronized (webServicePathRewriteRuleLock)
{
if (uch != null)
@@ -332,10 +336,7 @@
public void create() throws Exception
{
- //Retrieve the stackConfig using SPIProvider
- final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- this.stackConfig = SPIProvider.getInstance().getSPI(StackConfigFactory.class,
cl).getStackConfig();
-
+ setStackConfig();
MANAGEMENT_LOGGER.startingWSServerConfig(getImplementationTitle(),
getImplementationVersion());
MBeanServer mbeanServer = getMbeanServer();
if (mbeanServer != null) {
@@ -349,6 +350,19 @@
serverConfig = this;
}
}
+
+ private void setStackConfig() {
+ if (stackConfig == null) {
+ synchronized (this)
+ {
+ if (stackConfig == null) {
+ //Retrieve the stackConfig using SPIProvider
+ final ClassLoader cl =
ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ this.stackConfig =
SPIProvider.getInstance().getSPI(StackConfigFactory.class, cl).getStackConfig();
+ }
+ }
+ }
+ }
public void destroy() throws Exception
{
Show replies by date