jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shanmugam Gopal" <haishanmu...@hotmail.com>
Subject jackrabbit repository and Database distributed transaction
Date Fri, 25 Aug 2006 06:05:52 GMT


I am trying to insert a record into DB and insert a node in Jackrabbit 
repository in a single transaction.
I am using Spring module's JCR support for accessing the repository and 
for accessing the Database.

If there is any exception while accessing the repository,
both the operation should be rolled back.

If everythig goes fine, both needs to be committed.

1)What's the transaction manager should I use in this scenario.
2)Also should I call session.save() in DAO explicitly or not ?

public void save(final Course course)throws DataAccessException
             log.info("Save Method");
             getJcrTemplate().execute(new JcrCallback() {
                   public Object doInJcr(Session session) throws
			RepositoryException {
                     Node root = session.getRootNode();>
                     Node sample = root.addNode( course.getName()
                     return null;

One and only Ash. Find out all about her. Only on MSN Search 

View raw message