Hi,
I am wondering how to do the following with transactions :
Bean-se -> CXF-Se -> Call outer service (ws1)
Call outer service (ws1)
Bean-se will open the transaction as followed :
byte[] binaryContent = null;
if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
NormalizedMessage message = exchange.getMessage("in");
try {
TransactionManager tm = (TransactionManager)
context.getTransactionManager();
m_gLogger.debug("TransactionManager = " + tm.getClass() + " : "
+ tm);
tm.begin();
} catch (Exception e) {
m_gLogger.error("error", e);
}
... all happened well :
tm.commit();
.. An exception :
tm.rollback();
Into the Cxf-se the transactionManager can be retrieved with a
getServiceMixClient :
if (getClient() != null) {
TransactionManager tm = (TransactionManager)
getClient().getContext().getTransactionManager();
My question : is how to pass as parameter the transactionManager to Ws
outside the ESB?
How to set a database connection from the ESb that will be used by my
external services?
I have a WS java application running into a Glassfish server that will
insert data into database, I want this application to use the transaction
init into ESB.
Regards.
--
View this message in context:
http://old.nabble.com/Distributed-transactions-outside-ESB...-how-to--tp28287676p28287676.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.