JBossWS SVN: r19022 - in common/branches/JBWS-3797/src: main/java/org/jboss/ws/common/management and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-21 05:37:37 -0400 (Tue, 21 Oct 2014)
New Revision: 19022
Modified:
common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java
Log:
[JBWS-3797]:Fix typo
Modified: common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-10-21 09:34:16 UTC (rev 19021)
+++ common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-10-21 09:37:37 UTC (rev 19022)
@@ -84,7 +84,7 @@
String hostAndPort = host + (currentPort > 0 ? ":" + currentPort : "");
if (ep.getService().getVirtualHost() != null && !confidential) {
hostAndPort = ep.getService().getVirtualHost() + ":"
- + getServerConfig().getVirutalHostPort(ep.getService().getVirtualHost());
+ + getServerConfig().getVirtualHostPort(ep.getService().getVirtualHost());
}
HttpEndpoint httpEp = (HttpEndpoint)ep;
String urlPattern = httpEp.getURLPattern();
Modified: common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-10-21 09:34:16 UTC (rev 19021)
+++ common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-10-21 09:37:37 UTC (rev 19022)
@@ -440,7 +440,7 @@
public interface UpdateCallbackHandler {
public void onBeforeUpdate();
}
- public Integer getVirutalHostPort() {
+ public Integer getVirtualHostPort() {
return null;
}
}
Modified: common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java
===================================================================
--- common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java 2014-10-21 09:34:16 UTC (rev 19021)
+++ common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java 2014-10-21 09:37:37 UTC (rev 19022)
@@ -59,7 +59,7 @@
}
@Override
- public Integer getVirutalHostPort(String virtualHost)
+ public Integer getVirtualHostPort(String virtualHost)
{
return null;
}
10 years, 2 months
JBossWS SVN: r19021 - spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-21 05:34:16 -0400 (Tue, 21 Oct 2014)
New Revision: 19021
Modified:
spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
Log:
[JBWS-3797]:Fix typo
Modified: spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
--- spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2014-10-21 09:22:22 UTC (rev 19020)
+++ spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2014-10-21 09:34:16 UTC (rev 19021)
@@ -136,5 +136,5 @@
* @param virtualHost virtual host name
* @return port value for virtual host
*/
- Integer getVirutalHostPort(String virtualHost);
+ Integer getVirtualHostPort(String virtualHost);
}
10 years, 2 months
JBossWS SVN: r19020 - stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-10-21 05:22:22 -0400 (Tue, 21 Oct 2014)
New Revision: 19020
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint2Impl.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllTestCase.java
Log:
[WFLY-3988] Improving PermitAllTestCase to cover the requested scenario
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint.java 2014-10-21 02:42:59 UTC (rev 19019)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint.java 2014-10-21 09:22:22 UTC (rev 19020)
@@ -36,4 +36,8 @@
@WebMethod
@WebResult(targetNamespace = "http://org.jboss.ws/securityDomain", partName = "return")
public String echo(@WebParam(name = "arg0", partName = "arg0") String arg0);
+
+ @WebMethod
+ @WebResult(targetNamespace = "http://org.jboss.ws/securityDomain", partName = "return")
+ public String echoForAll(@WebParam(name = "arg0", partName = "arg0") String arg0);
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint2Impl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint2Impl.java 2014-10-21 02:42:59 UTC (rev 19019)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllSecureEndpoint2Impl.java 2014-10-21 09:22:22 UTC (rev 19020)
@@ -65,4 +65,11 @@
log.info(input);
return input;
}
+
+ @WebMethod
+ public String echoForAll(String input)
+ {
+ log.info(input);
+ return input;
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllTestCase.java 2014-10-21 02:42:59 UTC (rev 19019)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/securityDomain/PermitAllTestCase.java 2014-10-21 09:22:22 UTC (rev 19020)
@@ -122,6 +122,14 @@
assertTrue(e.getMessage().contains("Could not send Message"));
assertTrue(e.getCause().getMessage().contains("401: Unauthorized"));
}
+ try {
+ port.echoForAll("Hi");
+ fail("Authentication exception expected!");
+ } catch (Exception e) {
+ //expected web layer exception
+ assertTrue(e.getMessage().contains("Could not send Message"));
+ assertTrue(e.getCause().getMessage().contains("401: Unauthorized"));
+ }
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "bob");
((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "foo");
@@ -132,9 +140,11 @@
//expected EJB3 layer authorization exception
assertTrue(e.getMessage().contains("not allowed"));
}
+ assertEquals("Hi", port.echoForAll("Hi"));
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "john");
((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "bar");
assertEquals("Hello", port.echo("Hello"));
+ assertEquals("Hi", port.echoForAll("Hi"));
}
}
10 years, 2 months
JBossWS SVN: r19019 - in common/branches/JBWS-3797/src: main/java/org/jboss/ws/common/management and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-20 22:42:59 -0400 (Mon, 20 Oct 2014)
New Revision: 19019
Modified:
common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java
Log:
[JBWS-3797]:Let @WebContext(virtualHost...) affect endpoint address
Modified: common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-10-21 02:41:13 UTC (rev 19018)
+++ common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-10-21 02:42:59 UTC (rev 19019)
@@ -82,7 +82,10 @@
boolean confidential = isConfidentialTransportGuarantee(dep, ep);
int currentPort = port.getValue(confidential);
String hostAndPort = host + (currentPort > 0 ? ":" + currentPort : "");
-
+ if (ep.getService().getVirtualHost() != null && !confidential) {
+ hostAndPort = ep.getService().getVirtualHost() + ":"
+ + getServerConfig().getVirutalHostPort(ep.getService().getVirtualHost());
+ }
HttpEndpoint httpEp = (HttpEndpoint)ep;
String urlPattern = httpEp.getURLPattern();
if (urlPattern == null)
@@ -209,7 +212,7 @@
}
return this.port;
}
-
+ //TODO:Handle virtual host in webContext. This needs to be supported in undertow(see WebServerService)
public Integer getSecurePortValue()
{
if (this.securePort == null && this.sarm != null)
Modified: common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-10-21 02:41:13 UTC (rev 19018)
+++ common/branches/JBWS-3797/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2014-10-21 02:42:59 UTC (rev 19019)
@@ -440,4 +440,7 @@
public interface UpdateCallbackHandler {
public void onBeforeUpdate();
}
+ public Integer getVirutalHostPort() {
+ return null;
+ }
}
Modified: common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java
===================================================================
--- common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java 2014-10-21 02:41:13 UTC (rev 19018)
+++ common/branches/JBWS-3797/src/test/java/org/jboss/test/ws/common/management/AbstractServerConfigTestCase.java 2014-10-21 02:42:59 UTC (rev 19019)
@@ -57,6 +57,12 @@
{
return null;
}
+
+ @Override
+ public Integer getVirutalHostPort(String virtualHost)
+ {
+ return null;
+ }
};
//test default value
10 years, 2 months
JBossWS SVN: r19018 - spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-20 22:41:13 -0400 (Mon, 20 Oct 2014)
New Revision: 19018
Modified:
spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
Log:
[JBWS-3797]:Let @WebContext(virtualHost...) affect endpoint address
Modified: spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java
===================================================================
--- spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2014-10-21 02:37:35 UTC (rev 19017)
+++ spi/branches/JBWS-3797/src/main/java/org/jboss/wsf/spi/management/ServerConfig.java 2014-10-21 02:41:13 UTC (rev 19018)
@@ -130,4 +130,11 @@
* @return
*/
EndpointConfig getEndpointConfig(String name);
+
+ /**
+ * Get port for virtual host, if there are many ports found only return the first found
+ * @param virtualHost virtual host name
+ * @return port value for virtual host
+ */
+ Integer getVirutalHostPort(String virtualHost);
}
10 years, 2 months
JBossWS SVN: r19017 - common/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-20 22:37:35 -0400 (Mon, 20 Oct 2014)
New Revision: 19017
Added:
common/branches/JBWS-3797/
Log:
Create JBWS-3797 workspace
10 years, 2 months
JBossWS SVN: r19016 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-10-20 22:35:41 -0400 (Mon, 20 Oct 2014)
New Revision: 19016
Added:
spi/branches/JBWS-3797/
Log:
Create JBWS-3797 workspace
10 years, 2 months
JBossWS SVN: r19015 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-10-20 04:47:03 -0400 (Mon, 20 Oct 2014)
New Revision: 19015
Added:
spi/tags/jbossws-spi-3.0.0.Beta2/
Log:
Tagging jbossws-spi-3.0.0.Beta2
10 years, 2 months
JBossWS SVN: r19014 - in container/jboss72/branches/jbossws-jboss720-4.3.x: server-integration/src/main/java/org/jboss/as/webservices/dmr and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-10-17 09:52:03 -0400 (Fri, 17 Oct 2014)
New Revision: 19014
Modified:
container/jboss72/branches/jbossws-jboss720-4.3.x/
container/jboss72/branches/jbossws-jboss720-4.3.x/pom.xml
container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java
container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java
container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java
Log:
[JBWS-3838] Sort UnifiedHandlerMetaData instances before adding to the chain
Property changes on: container/jboss72/branches/jbossws-jboss720-4.3.x
___________________________________________________________________
Added: svn:mergeinfo
+ /container/wildfly81/branches/jbossws-wildfly810:19010
Modified: container/jboss72/branches/jbossws-jboss720-4.3.x/pom.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720-4.3.x/pom.xml 2014-10-17 13:47:22 UTC (rev 19013)
+++ container/jboss72/branches/jbossws-jboss720-4.3.x/pom.xml 2014-10-17 13:52:03 UTC (rev 19014)
@@ -51,7 +51,7 @@
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.3.0.Final</jbossws.spi.version>
+ <jbossws.spi.version>2.3.1-SNAPSHOT</jbossws.spi.version>
<jbossws.common.version>2.3.0.Final</jbossws.common.version>
<jboss.msc.version>1.0.4.GA</jboss.msc.version>
<jboss.version>7.2.0.Final</jboss.version>
Modified: container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java 2014-10-17 13:47:22 UTC (rev 19013)
+++ container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java 2014-10-17 13:52:03 UTC (rev 19014)
@@ -29,6 +29,7 @@
import static org.jboss.as.webservices.dmr.PackageUtils.getHandlerServiceName;
import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
import org.jboss.as.controller.AbstractAddStepHandler;
import org.jboss.as.controller.OperationContext;
@@ -51,6 +52,7 @@
final class HandlerAdd extends AbstractAddStepHandler {
static final HandlerAdd INSTANCE = new HandlerAdd();
+ static final AtomicInteger counter = new AtomicInteger(0);
private HandlerAdd() {
// forbidden instantiation
@@ -77,7 +79,7 @@
final String handlerName = address.getElement(address.size() - 1).getValue();
final String handlerClass = operation.require(CLASS).asString();
- final HandlerService service = new HandlerService(handlerName, handlerClass);
+ final HandlerService service = new HandlerService(handlerName, handlerClass, counter.incrementAndGet());
final ServiceTarget target = context.getServiceTarget();
final ServiceName configServiceName = getConfigServiceName(configType, configName);
final ServiceRegistry registry = context.getServiceRegistry(false);
Modified: container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java 2014-10-17 13:47:22 UTC (rev 19013)
+++ container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java 2014-10-17 13:52:03 UTC (rev 19014)
@@ -24,6 +24,8 @@
import static org.jboss.as.webservices.WSMessages.MESSAGES;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.jboss.as.webservices.dmr.ListInjector;
@@ -63,6 +65,15 @@
@Override
public void start(final StartContext context) throws StartException {
+ Comparator<UnifiedHandlerMetaData> c = new Comparator<UnifiedHandlerMetaData>() {
+ @Override
+ public int compare(UnifiedHandlerMetaData o1, UnifiedHandlerMetaData o2) {
+ return o1.getId().compareTo(o2.getId());
+ }
+ };
+ synchronized (handlers) {
+ Collections.sort(handlers, c);
+ }
handlerChain = new UnifiedHandlerChainMetaData(null, null, protocolBindings, handlers, false, handlerChainId);
}
Modified: container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java 2014-10-17 13:47:22 UTC (rev 19013)
+++ container/jboss72/branches/jbossws-jboss720-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java 2014-10-17 13:52:03 UTC (rev 19014)
@@ -36,11 +36,13 @@
private final String handlerName;
private final String handlerClass;
+ private final int counter;
private volatile UnifiedHandlerMetaData handler;
- public HandlerService(String handlerName, String handlerClass) {
+ public HandlerService(String handlerName, String handlerClass, int counter) {
this.handlerName = handlerName;
this.handlerClass = handlerClass;
+ this.counter = counter;
}
@Override
@@ -50,7 +52,7 @@
@Override
public void start(final StartContext context) throws StartException {
- handler = new UnifiedHandlerMetaData(handlerClass, handlerName, null, null, null, null);
+ handler = new UnifiedHandlerMetaData(handlerClass, handlerName, null, null, null, null, String.valueOf(counter));
}
@Override
10 years, 2 months
JBossWS SVN: r19013 - in container/wildfly80/branches/jbossws-wildfly800-4.3.x: server-integration/src/main/java/org/jboss/as/webservices/dmr and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-10-17 09:47:22 -0400 (Fri, 17 Oct 2014)
New Revision: 19013
Modified:
container/wildfly80/branches/jbossws-wildfly800-4.3.x/
container/wildfly80/branches/jbossws-wildfly800-4.3.x/pom.xml
container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java
container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java
container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java
Log:
[JBWS-3838] Sort UnifiedHandlerMetaData instances before adding to the chain
Property changes on: container/wildfly80/branches/jbossws-wildfly800-4.3.x
___________________________________________________________________
Added: svn:mergeinfo
+ /container/wildfly81/branches/jbossws-wildfly810:19010
Modified: container/wildfly80/branches/jbossws-wildfly800-4.3.x/pom.xml
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800-4.3.x/pom.xml 2014-10-17 13:44:18 UTC (rev 19012)
+++ container/wildfly80/branches/jbossws-wildfly800-4.3.x/pom.xml 2014-10-17 13:47:22 UTC (rev 19013)
@@ -51,7 +51,7 @@
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.3.0.Final</jbossws.spi.version>
+ <jbossws.spi.version>2.3.1-SNAPSHOT</jbossws.spi.version>
<jbossws.common.version>2.3.0.Final</jbossws.common.version>
<jboss.msc.version>1.2.0.Final</jboss.msc.version>
<wildfly.version>8.0.0.Final</wildfly.version>
Modified: container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java 2014-10-17 13:44:18 UTC (rev 19012)
+++ container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/dmr/HandlerAdd.java 2014-10-17 13:47:22 UTC (rev 19013)
@@ -29,6 +29,7 @@
import static org.jboss.as.webservices.dmr.PackageUtils.getHandlerServiceName;
import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
import org.jboss.as.controller.AbstractAddStepHandler;
import org.jboss.as.controller.OperationContext;
@@ -51,6 +52,7 @@
final class HandlerAdd extends AbstractAddStepHandler {
static final HandlerAdd INSTANCE = new HandlerAdd();
+ static final AtomicInteger counter = new AtomicInteger(0);
private HandlerAdd() {
// forbidden instantiation
@@ -77,7 +79,7 @@
final String handlerName = address.getElement(address.size() - 1).getValue();
final String handlerClass = operation.require(CLASS).asString();
- final HandlerService service = new HandlerService(handlerName, handlerClass);
+ final HandlerService service = new HandlerService(handlerName, handlerClass, counter.incrementAndGet());
final ServiceTarget target = context.getServiceTarget();
final ServiceName configServiceName = getConfigServiceName(configType, configName);
final ServiceRegistry registry = context.getServiceRegistry(false);
Modified: container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java 2014-10-17 13:44:18 UTC (rev 19012)
+++ container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerChainService.java 2014-10-17 13:47:22 UTC (rev 19013)
@@ -24,6 +24,8 @@
import static org.jboss.as.webservices.WSMessages.MESSAGES;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.jboss.as.webservices.dmr.ListInjector;
@@ -63,6 +65,15 @@
@Override
public void start(final StartContext context) throws StartException {
+ Comparator<UnifiedHandlerMetaData> c = new Comparator<UnifiedHandlerMetaData>() {
+ @Override
+ public int compare(UnifiedHandlerMetaData o1, UnifiedHandlerMetaData o2) {
+ return o1.getId().compareTo(o2.getId());
+ }
+ };
+ synchronized (handlers) {
+ Collections.sort(handlers, c);
+ }
handlerChain = new UnifiedHandlerChainMetaData(null, null, protocolBindings, handlers, false, handlerChainId);
}
Modified: container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java
===================================================================
--- container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java 2014-10-17 13:44:18 UTC (rev 19012)
+++ container/wildfly80/branches/jbossws-wildfly800-4.3.x/server-integration/src/main/java/org/jboss/as/webservices/service/HandlerService.java 2014-10-17 13:47:22 UTC (rev 19013)
@@ -36,11 +36,13 @@
private final String handlerName;
private final String handlerClass;
+ private final int counter;
private volatile UnifiedHandlerMetaData handler;
- public HandlerService(String handlerName, String handlerClass) {
+ public HandlerService(String handlerName, String handlerClass, int counter) {
this.handlerName = handlerName;
this.handlerClass = handlerClass;
+ this.counter = counter;
}
@Override
@@ -50,7 +52,7 @@
@Override
public void start(final StartContext context) throws StartException {
- handler = new UnifiedHandlerMetaData(handlerClass, handlerName, null, null, null, null);
+ handler = new UnifiedHandlerMetaData(handlerClass, handlerName, null, null, null, null, String.valueOf(counter));
}
@Override
10 years, 2 months