jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmjose26 <mmjos...@yahoo.com.mx>
Subject Is it possible to have both asynchronous listener and Jta Transaction?
Date Wed, 20 Jul 2011 18:28:50 GMT
Hi, I want to have both, but when I enable JTA transaction, the onEvent
method are not called. 
And if possible, I want to versioning all nodes added to repository in 
asynchronous listener. 

here the script code:



                        boolean enableTransaction=true;
                        ObservationManager obsManager =
session.getWorkspace().getObservationManager();
                        obsManager.addEventListener(new  
DummyEventListener(),Event.NODE_ADDED,"/",true,null,null,false);
                        if (enableTransaction){
                            XASession xasession = (XASession) session;
                           
transaction.enlistResource(xasession.getXAResource());
                            } 
                        }
...
adding node
...
...
session.save();


the begin and commit transaction is performed by Spring
JtaTransactionManager.


Any help would be appreciated.

Thanks, 

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Is-it-possible-to-have-both-asynchronous-listener-and-Jta-Transaction-tp3681731p3681731.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message