Irantha On the face of it your approach is tempting. However, the transaction from the persistent store to acknowledge is actually not the hard part. You don't even need to use the AfterCompletion(). You simply need to have the ack driven off the database rather than the inflow logic.
The real problem is that there is no point in having a transactional ack if the data then gets lost between the persistent store and the application. And the only way of getting that to work is using JTA. You have no control over what databases, JMS queues or other transactional systems the application can call, so the only way to ensure transactional delivery of the message is to use JTA for the persistent store. Paul On Mon, Dec 1, 2008 at 9:41 AM, Irantha <[EMAIL PROTECTED]> wrote: > Hi Paul, > > Sandesha2 Transaction is used to make consistent changes to the data store. > Changing it from a JDBC local transaction to JTA transaction will > make implementation complex and require to use a JTA aware data source for > Sandesha2 persistence. > A Simpler solution would be to differ Acknowledgments until JTA transaction > commits. We can use javax.transaction.Synchronization.AfterCompletion() > event to hook in acknowledgments. Sending side redelivery policy will take > care of retrying aborted transactions. > > WDYT? > > Thanks, > Irantha > > > Paul Fremantle wrote: > > Irantha > > Sandesha2 already has a plug point for transactions. Please see: > > URL: > https://svn.apache.org/repos/asf/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/storage/Transaction.java > > And the implementations of that. > > Paul > > On Fri, Nov 28, 2008 at 9:08 AM, Irantha <[EMAIL PROTECTED]> wrote: > > > OMHO It would be useful to have Sandesha2 capable of sending and receiving > ws-rm messages within a JTA transaction (similar to how JMS implementations > support JTA transactions). > > On the sending side sandesha2 should look for an existing JTA transactions > and participate on that transaction if one exists. > On the receiving side need a parameter (in module.xml) that specify whether > to start a new JTA transaction on message receive. If that parameter is > specified then should start a new JTA transaction for each message receive. > > What do you think? > > -Irantha > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Paul Fremantle Co-Founder and CTO, WSO2 Apache Synapse PMC Chair OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]