-
1. Re: XTS with existing Web Services
paul.robinson Nov 19, 2012 11:27 AM (in response to joe.chuah)Wooi,
No it isn't possible. The Web service must participate in the protocol, hence it needs to implement a participant. Do you have any control over the service? If you are interested in using WS-AT, you can update the existing service with minimal effort, to use the TXBridge. The TXBridge generates its own participants and relatively transparently bridges a WS-AT transaction onto a JTA transaction. Take a look at our TXBridge quickstarts for some examples: https://github.com/jbosstm/quickstart
If you are calling a third-party service, then you might be able to do something with WS-BA. WS-BA is different to WS-AT, in that it uses a compensation approach. You might be able to front the legacy service with a WS-BA service that invokes some compensation action on the legacy service, should compensation be required.
Paul.
-
2. Re: XTS with existing Web Services
joe.chuah Nov 20, 2012 1:31 AM (in response to paul.robinson)Hi Paul,
Thanks for pointing me in the right direction (needed a bridge for JTA and WS-AT). I looked through the quickstart and some documentation at http://docs.jboss.org/jbosstm/5.0.0.M1/guides/txbridge_guide/ch04.html
The doc says:
I don't really understand the underlined part as the quickstart demo only seems to have the following lines to register the handler
Restaurant restaurant = service.getPort(portName, Restaurant.class);
//Add client Handlers
List<Handler> handlers = new ArrayList<Handler>(1);
handlers.add(new JaxWSTxOutboundBridgeHandler());
handlers.add(new JaxWSHeaderContextProcessor());
BindingProvider bindingProvider = (BindingProvider) restaurant;
bindingProvider.getBinding().setHandlerChain(handlers);
I assume the quickstart is the accurate way to do it?
Also when you said existing services can be updated with minimal effort, does it mean using an inbound bridge?
-
3. Re: XTS with existing Web Services
paul.robinson Nov 22, 2012 6:42 AM (in response to joe.chuah)Wooi,
Wooi Joe Chuah wrote:
I don't really understand the underlined part as the quickstart demo only seems to have the following lines to register the handler
Restaurant restaurant = service.getPort(portName, Restaurant.class);
//Add client Handlers
List<Handler> handlers = new ArrayList<Handler>(1);
handlers.add(new JaxWSTxOutboundBridgeHandler());
handlers.add(new JaxWSHeaderContextProcessor());
BindingProvider bindingProvider = (BindingProvider) restaurant;
bindingProvider.getBinding().setHandlerChain(handlers);
This is what you need on the client side, to bridge a JTA transaction to an outgoing WS-AT transaction. Essentially, it add's a SOAP handler into the outgoing handler chain. This handler is responsible for managing the mapping between the JTA anf WS-AT transaction.
Also when you said existing services can be updated with minimal effort, does it mean using an inbound bridge?
Yes, you just need to add the @HandlerChain(...) annotation to your service. If you want to be sure it's working, also annotate your service with the MANDATORY transaction type. This will fail if there isn't a JTA transaction present when the servie is invoked. If you configured the bridge correctly, the incoming WS-AT transaction will be bridged onto a new JTA transaction, ready for when your service method is invoked.
Also, you can try rolling back your transaction from the client and ensuring that the work done in the Service's JTA transaction is also rolledback. If the Bridge is not configured correctly, you could see the service's JTA transaction commit, whilst the client's transaction rollsback.
Paul.
-
4. Re: XTS with existing Web Services
joe.chuah Nov 23, 2012 12:29 AM (in response to paul.robinson)Hi Paul,
It seems I can't deploy XTS on Jboss EAP 5.1.2 due to this https://issues.jboss.org/browse/JBPAPP-10384 but the issue seems to be resolved already.
Could guide me on how I can get the fixed version?
Thanks
-
5. Re: XTS with existing Web Services
paul.robinson Nov 23, 2012 4:52 AM (in response to joe.chuah)Wooi,
That issue only affects an internal build of EAP (EAP_EWP 5.2.0 ER4), you shouldn't get it in EAP 5.1.2 (or 5.2.0 when it is released).
Are you seeing a problem when you try to deploy XTS onto EAP 5.1.2?
Paul.
-
6. Re: XTS with existing Web Services
joe.chuah Nov 25, 2012 4:26 AM (in response to paul.robinson)Paul,
Yeah I get that problem when I try to deploy XTS on the jboss that comes with Redhat BRMS.
If I'm not mistaken its EAP 5.1.2
-
7. Re: XTS with existing Web Services
paul.robinson Nov 26, 2012 4:03 AM (in response to joe.chuah)Wooi,
Are you absolutely sure it's the same issue as JBPAPP-10384? Do you see the following error on the console:
DEPLOYMENTS IN ERROR: Deployment "XTSService" is in error due to the following reason(s): java.lang.SecurityException: class "org.jboss.jbossts.xts.recovery.participant.at.XTSATRecoveryModule"'s signer information does not match signer information of other classes in the same package
As you are using EAP, you should take this up with your support contact at Red Hat. You'll get a better level of service from them. These forums are intended for community support and only serviced at a level of "best effort".
Paul.
-
8. Re: XTS with existing Web Services
joe.chuah Nov 29, 2012 10:18 PM (in response to paul.robinson)Hi Paul,
Apparently they are planning to roll out the fixes with EAP 5.2.1
Thanks for the help so far.
-
9. Re: XTS with existing Web Services
paul.robinson Dec 5, 2012 2:59 AM (in response to joe.chuah)You're welcome,
Glad you're getting a resolution,
Paul.