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.

Reply via email to