Allessio
I'm at the point where I think I have correctly configured the metadata to include the handler. In my example, I have an existing handler (org.my.simple.server.MyServerHandler) defined by a @HandlerChain annotation on the WS impl. I then add another Handler (org.jboss.as.xts.TXFrameworkHandler) to the mapping at deployment time in my DUP.
I put a breakpoint in WSIntegrationProcessorJAXWS_HANDLER#processAnnotation, on the following line:
final WSEndpointHandlersMapping mapping = getRequiredAttachment(unit, WS_ENDPOINT_HANDLERS_MAPPING_KEY);
The debugger provides the following output:
mapping = {org.jboss.as.webservices.injection.WSEndpointHandlersMapping@626}
endpointHandlersMap = {java.util.HashMap@646} size = 1
Re: Can I modify the HandlerChain at deploy time? = {java.util.HashMap$Entry@653} org.my.simple.server.EchoServiceImpl -> org.my.simple.server.MyServerHandler, org.jboss.as.xts.TXFrameworkHandler
key: java.lang.String = {java.lang.String@657}"org.my.simple.server.EchoServiceImpl"
value: java.util.HashSet = {java.util.HashSet@627} size = 2
Re: Can I modify the HandlerChain at deploy time? = {java.lang.String@638}"org.my.simple.server.MyServerHandler"
Re: Can I modify the HandlerChain at deploy time? = {java.lang.String@664}"org.jboss.as.xts.TXFrameworkHandler"
So, it looks to me like I have setup the WSEndpointHandlersMapping correctly. However, The only handler that is invoked is the MyServerHandler. I've tried removing this handler from the set, in my DUP, and it is still invoked. This suggests to me that I'm either adding the wrong informtion, or doing it too late.
The order in which the relevent (IMO) DUPS are invoked is as follows:
- WSHandlerChainAnnotationProcessor
- TXFrameworkDeploymentProcessor (mine)
- WSIntegrationProcessorJAXWS_HANDLER
- WSRefAnnotationProcessor
In particular, here's the relavent (IMO) Phase priorities:
| | | public static final int PARSE_WEBSERVICES_XML | |
| = 0x2050; |
| public static final int PARSE_JBOSS_WEBSERVICES_XML | = 0x2051; |
| public static final int PARSE_JAXWS_EJB_INTEGRATION | = 0x2052; |
| public static final int PARSE_JAXRPC_POJO_INTEGRATION | = 0x2053; |
| public static final int PARSE_JAXRPC_EJB_INTEGRATION | = 0x2054; |
| public static final int PARSE_JAXWS_HANDLER_CHAIN_ANNOTATION | = 0x2055; |
| public static final int PARSE_TXFRAMEWORK_HANDLERS | = 0x2056; |
| public static final int PARSE_WS_JMS_INTEGRATION | = 0x2057; |
| public static final int PARSE_JAXWS_ENDPOINT_CREATE_COMPONENT_DESCRIPTIONS | = 0x2058; |
| public static final int PARSE_JAXWS_HANDLER_CREATE_COMPONENT_DESCRIPTIONS | = 0x2059; |
Do you have any idea why the WSEndpointHandlersMapping seems to be ignored?
Thanks,
Paul.