Hi !

I'm trying to configure jackrabbit in a clustered environment.
(following the clustered configuration guide wiki)
each node has the following in a single ear:

Jackrabbit deployed in OC4J as JCA, this expose the repository by JNDI and 
works with JTA transactions.
JackRabbit WebApp, this enable the repository by WebDav to remote clients.
Business App, consuming the repository by JNDI and enabling JTA transactions.
I'm using spring modules for integrate jcr with Business App and with remote 
clients.

All works fine in single node, but, in cluster, ONLY for the remote clients, 
I have some exceptions when I try to saving and versioning a node:


it happen when I try to get the identifier of a new saved node:

                        Node content  = saveFile(resource,session);//set the 
properties and add node to repo
                        String path = content.getPath();
                        session.save();
                        String id = content.getIdentifier();// this throws 
javax.jcr.InvalidItemStateException
                        //'org.apache.jackrabbit.jcr2spi.NodeImpl@2bace2' 
doesn't exist anymore. (Status = REMOVED)
                        
session.getWorkspace().getVersionManager().checkin(path);
                        return id;

if I try to obtain the saved node again, the exception change:
                        Node content  = saveFile(resource,session);//set the 
properties and add node to repo
                        String path = content.getPath();
                        session.save();
                        content= session.getNode(path);// this throws 
javax.jcr.PathNotFoundException: here the path of content node        
                
                        String id = content.getIdentifier();
                        
session.getWorkspace().getVersionManager().checkin(path);
                        return id;
                        
                        
if after I query for the saved node, it exist.
I don't know if is a bad configuration cluster.
I think that the problem is the delta time that jackrabbit need  for match the 
info between node clusters, 
but I'm not sure, because if I put a delay time before session.getNode(path), 
it works:
 
                        Node content  = saveFile(resource,session);//set the 
properties and add node to repo
                        String path = content.getPath();
                        session.save();
                        for (int i = 0; i<maxAttemps ;i++){
                            try{
                                content= session.getNode(path);
                                break;
                                
                            }catch(PathNotFoundException ex){
                                delay(i*time);
                                session.refresh(true);
                            }
                        }
                        String id = content.getIdentifier();
                        
session.getWorkspace().getVersionManager().checkin(path);
                        return id;
comments are welcome! 
tanks for your help!
J


--
View this message in context: 
http://jackrabbit.510166.n4.nabble.com/Error-in-WebDav-clients-using-clustered-WebDav-server-tp3639150p3639150.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Reply via email to