Hi

 

I am not able to merge the nodes.

 

Unable to perform operation. Session has pending changes.

      at 
org.apache.jackrabbit.core.NodeImpl.checkSessionHasPending(NodeImpl.java:3134)

 

private static void testMultiSession() throws Exception

            {

                        SimpleCredentials creds = new 
SimpleCredentials("username",

                                               "password".toCharArray());

                        Session session = repository.login(creds);

                        

                        SimpleCredentials creds1 = new 
SimpleCredentials("username",

                                               "password".toCharArray());

                        Session session1 = repository.login(creds1);

                        String xpath = "customerList/customer/userList/user";

                        Node nodeToModify = getNodeToModify(xpath, session);

                        

                        Node nodeToModify1 = getNodeToModify(xpath, session1);

                        

                        nodeToModify.setProperty("data", "modify by session");

                        

                        nodeToModify1.setProperty("data", "modify by session1");

                        

                        nodeToModify.save();

                        //export(session);

                        try

                        {

                                   nodeToModify1.save();

                                   

                        } catch (javax.jcr.InvalidItemStateException ex)

                        {

 

                                   //NOW I TRY MERGE THE NODES nodeToModify and 
nodeToModify1

                                   

                                   nodeToModify1.merge("default", true);

                                   //nodeToModify1.save();

                                               

                        }

                        session.logout();

                        session1.logout();

                        

            }

 

 

 

http://www.maas.de <http://www.maas.de>  - Wir integrieren Zukunft

 

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. 
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. 
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.

 

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this e-mail 
is strictly forbidden. 

 

 

 

Reply via email to