At the point at which the ClassCastException is occuring, The Classloader being used is:
ModuleClassLoader for Module "deployment.txbridge-demo-service.jar:main" from Service Module Loader
Which is the one that I would expect to be used. The module has dependencies for "javax.xml.ws.handler.Handler" from "javax.xml.ws.api" and "org.jboss.jbossts.txbridge.inbound.JaxWSTxInboundBridgeHandler" from "org.jboss.xts". Which I think is enough to create the Handler. I'll debug the point at which the ModuleClassLoader is created and see if I can discover which dependencies are being pulled in.
ok, let me know if you find out something interesting
Do you know if I have correctly defined the Dependencies section of the MANIFEST.mf in order for the ClassLoader to be able to load the JaxWSTxInboundBridgeHandler and Handler classes? For example, do I need to export the org.jboss.xts and the javax.xml.ws.api dependencies?
AFAIK the dependencies you specified should be fine (no need for the export flag)