This example demonstrates a JTA client that invokes a remote EJB over Web services. The JTA transaction is distributed to the remote EJB using WS-AtomicTransaction. The service also acts as a client to a second service. Again using WS-AT to distribute the transaction over Web services. ==================================================

servlet client - localhost:8081/user?action=add

|

--------------------------------------------------------------

ServiceA Tomcat

Narayana JTA

Webservie - localhost:8082/user?action=add

--------------------------------------------------------------

|

txbridge

|

--------------------------------------------------------------

ServiceB Tomcat

Narayana JTA

Webservie - localhost:8083/user?action=add

--------------------------------------------------------------

|

txbridge

|

--------------------------------------------------------------

ServiceB Tomcat

Narayana JTA

--------------------------------------------------------------

＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝

---------------------------------------------

this may caused by race condition/socket timeout/exceed limits, will need to reproduce and research more;

at the beginning I thought it was caused by DB resource locking failed but after I commented out all DB access, the problem still there

XTS and TXBridge are normally used inside WildFly or EAP because they require quite a bit of configuration. We do not test them on Tomcat, so I'm unable to point you to the example of how to configure them properly for Tomcat. Would you be able to run your tests on WildFly to see if they work there?

Also, I see a lot of "Could not get org.jboss.ws.spi module classloader: java.lang.ClassNotFoundException: org.jboss.modules.Module" errors in the logs, so I'm guessing the failure is caused by misconfiguration rather than a performance issue.

when running on EAP you should make a couple of modifications to your code. Firstly, Narayana dependencies should be in a provided scope. Secondly, you don't need to provide handler chain unless you disable default context propagation in XTS subsystem configuration.

It's hard to tell why are you getting that NullPointerException from the log provided. Could you enable trace logging for com.arjuna and org.jboss.jbossts packages? Set console handler's level to trace and replace current com.arjuna logger in standalone-xts.xml logging configuration with the following:

WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."ServiceC1.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."ServiceC1.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "ServiceC1.war"

Could you make sure your logging subsystem configuration looks like example below? Because it's generating a lot of trace logging of other subsystems and it's hard to follow. Also could you also include log of only one start and execution. Because now each log is over 50MB.