We do not have outbound bridge implemented. So far we didn't have people interested in it, thus we didn't look into it.
However, if there would be more interest we might add it into the future release.
Although we do not provide an outbound bridge maybe an approach I posted on the resteasy email list could work for you. Suppose there are two web applications A and B whose work needs to be performed inside the same transaction:- A starts a JTA transaction and invokes REST endpoints in app B. To get the intended behaviour you could start a REST-AT transaction and then emulate what we do with the "inbound bridge" by manually starting a bridge before doing your JTA work. Something similar to:
- EJB in web app A will start a REST-AT transaction;
- EJB in web app A will start an InboundBridge (instead of the JTA transaction):
- InboundBridge inboundBridge = InboundBridgeManager.getInstance().createInboundBridge("enlistmentUrl from step 1");
- EJB in web app A will perform JTA work (insert some records in a database, send JMS messages etc);
- invoke a REST endpoint in app B passing the enlistmentUrl in a Link header;
- mark up the REST endpoint in app B (using the javax.transaction.Transactional annotation) - this will automatically start an instance of the inbound bridge;
- commit the REST-AT transaction started in step 1. This will cause the work done in B and in A to commit within the context of the single REST-AT transaction.
5. mark up the REST endpoint in app B (using the javax.transaction.Transactional annotation) - this will automatically start an instance of the inbound bridge;
Note that step 5 is only required if REST app B also needs to perform JTA work.