Hi Irantha
I'm working on a new synapse mediator to manipulate JTA transactions.
syanpse.xml configuration for new mediator:
<transaction
action="new|use-existing-or-new|fault-if-no-tx|commit|rollback|suspend|resume"/>
Meaning of action attribute values are explained below:
new : create a new jta transaction. generate a fault if a transaction
already exist.
use-existing-or-new : create a new jta transaction. do nothing if a
transaction exist.
fault-if-no-tx : generate a fault if no transaction exist. do nothing
if a transaction exist.
commit : commit transaction. generate a fault if no transaction exist.
rollback: rollback transaction. generate a fault if no transaction exist.
suspend: suspend transaction. generate a fault if no transaction exist.
resume: resume transaction. generate a fault if no transaction exist.
There will be a new transaction configuration section in axis2.xml to
define UserTransaction (used to create a new transaction) and
TransactionManager (need for suspend and resume actions ) JNDI
parameters.
newly created usertransaction is assigned to axis2 message context
property named BaseConstants.USER_TRANSACTION and newly created
transaction manager is assigned to axis2 message context property
named BaseConstants.TRANSACTION_MANAGER
Same message context property is used by JMS transport when creating a
new usertransaction.
WDYT?
+1
I also suggest you keep the Axis2 dev list updated about this too.. and
it'll be a good use case later on for a Axis2 service to be able to
create a new JTA transaction from within the service code. - e.g. a
http/s service invocation calls into a service implemented as an AAR
file, that creates a new JTA transaction and updates two physically
separate Databases. This might be also good for DataServices etc..
asankha
--
Asankha C. Perera
http://adroitlogic.org
http://esbmagic.blogspot.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]