Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5DFF810936 for ; Tue, 30 Jul 2013 09:17:12 +0000 (UTC) Received: (qmail 25821 invoked by uid 500); 30 Jul 2013 09:17:11 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 25484 invoked by uid 500); 30 Jul 2013 09:17:10 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Delivered-To: moderator for dev@jackrabbit.apache.org Received: (qmail 18755 invoked by uid 99); 30 Jul 2013 09:13:43 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Andrey.Sorokin@r-style.com designates 217.174.97.116 as permitted sender) X-AuditID: d9ae6174-b7ccbae00000204f-b7-51f783a9de1b From: =?koi8-r?B?88/Sz8vJziDhzsTSxcog98nL1M/Sz9fJ3g==?= To: "'dev@jackrabbit.apache.org'" Subject: JackRabbit 2.6.2 concurrent session access issue Thread-Topic: JackRabbit 2.6.2 concurrent session access issue Thread-Index: Ac6NBM7fkFM+yumMTpKwTzokM4EeNA== Date: Tue, 30 Jul 2013 09:13:23 +0000 Message-ID: <20EA666EE514B744BE0BFC09B4096987010622C9@RSX01.R-Style.com> Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.6.88] Content-Type: multipart/alternative; boundary="_000_20EA666EE514B744BE0BFC09B4096987010622C9RSX01RStylecom_" MIME-Version: 1.0 X-Brightmail-Tracker: AAAAAA== X-Virus-Checked: Checked by ClamAV on apache.org --_000_20EA666EE514B744BE0BFC09B4096987010622C9RSX01RStylecom_ Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hi all, we are in the process of evaluation Jack Rabbit for our project. Th= e problem is that during multithreading test, that emulate concurrent acces= s to JackRabbit, it periodically throws the next exception: DEBUG Thread-9 org.apache.jackrabbit.core.session.SessionState - Attempt to= perform item.getPath() while another thread is concurrently reading from s= ession-system-2. Blocking until the other thread is finished using this ses= sion. Please review your code to avoid concurrent use of a session. java.la= ng.Exception: Stack trace of concurrent access to session-system-2 For your convenience i provide the source of the test case below. Any comments are welcomed! Best Regards Andrey -- The source code import static java.lang.System.out; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Random; import javax.jcr.LoginException; import javax.jcr.Node; import javax.jcr.Repository; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.SimpleCredentials; import org.apache.jackrabbit.core.TransientRepository; public class MultiLoadTest implements Runnable { static private TransientRepository repository =3D new Trans= ientRepository(); private static final int NTHREDS =3D 100; public static void main(String[] args) { for (int i =3D 0; i < NTHREDS; i++) { new Thread(new MultiLoadTest= ()).start(); } } public void run() { Random generator =3D new Random(); Session session =3D null; String thread =3D Thread.currentThread().get= Name(); while (true) { try { // generate = shape number int shape = =3D generator.nextInt(6); DateFormat d= ateFormat =3D new SimpleDateFormat( = "yyyy/MM/dd HH:mm:ss"); Date date = =3D new Date(); out.println(= dateFormat.format(date) + " the shape number " = + shape + " is processing " + thread); session =3D = new Util().login(repository); // produce s= hapes and store in the repository Shapes.produ= ce(session.getRootNode(), shape, thread); // make chan= ges persistent session.save= (); // session l= ogout new Util().l= ogout(session); // make new = session session =3D = new Util().login(repository); // consume s= hapes Shapes.consu= me(session.getRootNode(), shape, thread); // session l= ogout new Util().l= ogout(session); // session l= ogin session =3D = new Util().login(repository); // delete sh= apes Shapes.delet= e(session.getRootNode(), shape, thread); // make chan= ges persistent session.save= (); new Util().l= ogout(session); } catch (Exception e) { e.printStack= Trace(); } finally { if (session = !=3D null && session.isLive()) { = new Util().logout(session); } } } } public static class Shapes { public static synchronized void produce(Node= root, int shape, String threa= d) throws Exception { if (shape =3D=3D 1) { Node shape1 = =3D root.addNode("shape1" + thread); Node a =3D s= hape1.addNode("a" + thread); Node c =3D a= .addNode("c" + thread); c.addNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .addNode("b" + thread); b.addNode("f= " + thread); b.addNode("g= " + thread); } if (shape > 1) { Node shape2 = =3D root.addNode("shape2" + thread); Node a =3D s= hape2.addNode("a" + thread); Node c =3D a= .addNode("c" + thread); c.addNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .addNode("b" + thread); b.addNode("f= " + thread); b.addNode("g= " + thread); } if (shape > 2) { Node shape3 = =3D root.addNode("shape3" + thread); Node a =3D s= hape3.addNode("a" + thread); Node c =3D a= .addNode("c" + thread); c.addNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .addNode("b" + thread); b.addNode("f= " + thread); b.addNode("g= " + thread); } if (shape > 3) { Node shape4 = =3D root.addNode("shape4" + thread); Node a =3D s= hape4.addNode("a" + thread); Node c =3D a= .addNode("c" + thread); c.addNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .addNode("b" + thread); b.addNode("f= " + thread); b.addNode("g= " + thread); } if (shape > 4) { Node shape5 = =3D root.addNode("shape5" + thread); Node a =3D s= hape5.addNode("a" + thread); Node c =3D a= .addNode("c" + thread); c.addNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .addNode("b" + thread); b.addNode("f= " + thread); b.addNode("g= " + thread); } } public static synchronized void consume(Node= root, int shape, String threa= d) throws Exception { if (shape =3D=3D 1) { Node shape1 = =3D root.getNode("shape1" + thread); Node a =3D s= hape1.getNode("a" + thread); Node c =3D a= .getNode("c" + thread); c.getNode("d= " + thread); c.getNode("e= " + thread); Node b =3D a= .getNode("b" + thread); b.getNode("f= " + thread); b.getNode("g= " + thread); } if (shape > 1) { Node shape2 = =3D root.getNode("shape2" + thread); Node a =3D s= hape2.getNode("a" + thread); Node c =3D a= .getNode("c" + thread); c.getNode("d= " + thread); c.getNode("e= " + thread); Node b =3D a= .getNode("b" + thread); b.getNode("f= " + thread); b.getNode("g= " + thread); } if (shape > 2) { Node shape3 = =3D root.getNode("shape3" + thread); Node a =3D s= hape3.getNode("a" + thread); Node c =3D a= .getNode("c" + thread); c.getNode("d= " + thread); c.addNode("e= " + thread); Node b =3D a= .getNode("b" + thread); b.getNode("f= " + thread); b.getNode("g= " + thread); } if (shape > 3) { Node shape4 = =3D root.getNode("shape4" + thread); Node a =3D s= hape4.getNode("a" + thread); Node c =3D a= .getNode("c" + thread); c.getNode("d= " + thread); c.getNode("e= " + thread); Node b =3D a= .getNode("b" + thread); b.getNode("f= " + thread); b.getNode("g= " + thread); } if (shape > 4) { Node shape5 = =3D root.getNode("shape5" + thread); Node a =3D s= hape5.getNode("a" + thread); Node c =3D a= .getNode("c" + thread); c.getNode("d= " + thread); c.getNode("e= " + thread); Node b =3D a= .getNode("b" + thread); b.getNode("f= " + thread); b.getNode("g= " + thread); } } public static synchronized void delete(Node = root, int shape, String threa= d) throws Exception { if (shape =3D=3D 1) { root.getNode= ("shape1" + thread).remove(); } if (shape > 1) { root.getNode= ("shape2" + thread).remove(); } if (shape > 2) { root.getNode= ("shape3" + thread).remove(); } if (shape > 3) { root.getNode= ("shape4" + thread).remove(); } if (shape > 4) { root.getNode= ("shape5" + thread).remove(); } } } public class Util { public Session login(Repository repository) = { Session session =3D null; try { session =3D = repository.login(new SimpleCredentials("admin", = "admin".toCharArray())); } catch (LoginException e) { e.printStack= Trace(); } catch (RepositoryException= e) { e.printStack= Trace(); } return session; } public void logout(Session session) { session.logout(); } } } --_000_20EA666EE514B744BE0BFC09B4096987010622C9RSX01RStylecom_ Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable

Hi all, we are in the process o= f evaluation Jack Rabbit for our project. The problem is that during multit= hreading test, that emulate concurrent access to JackRabbit, it periodicall= y throws the next exception:

 

DEBUG Thread-9 org.apache.jackr= abbit.core.session.SessionState - Attempt to perform item.getPath() while a= nother thread is concurrently reading from session-system-2. Blocking until= the other thread is finished using this session. Please review your code to avoid concurrent use of a session= . java.lang.Exception: Stack trace of concurrent access to session-system-2=

 

For your convenience i provide = the source of the test case below.

 

Any comments are welcomed!=

 

Best Regards<= /p>

 

Andrey

 

-- The source code

 

import static java.lang.System.= out;

 

import java.text.DateFormat;

import java.text.SimpleDateForm= at;

import java.util.Date;

import java.util.Random;

 

import javax.jcr.LoginException= ;

import javax.jcr.Node;

import javax.jcr.Repository;

import javax.jcr.RepositoryExce= ption;

import javax.jcr.Session;<= /o:p>

import javax.jcr.SimpleCredenti= als;

 

import org.apache.jackrabbit.co= re.TransientRepository;

 

public class MultiLoadTest impl= ements Runnable {

 

     &= nbsp;          static private = TransientRepository repository =3D new TransientRepository();

     &= nbsp;          private static = final int NTHREDS =3D 100;

 

     &= nbsp;          public static v= oid main(String[] args) {

     &= nbsp;           &nbs= p;             = for (int i =3D 0; i < NTHREDS; i++) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    new Thread(new MultiLoadTest()).start();

     &= nbsp;           &nbs= p;             = }

     &= nbsp;          }

 

     &= nbsp;          public void run= () {

     &= nbsp;           &nbs= p;             = Random generator =3D new Random();

     &= nbsp;           &nbs= p;             = Session session =3D null;

     &= nbsp;           &nbs= p;             = String thread =3D Thread.currentThread().getName();

 

     &= nbsp;           &nbs= p;             = while (true) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    try {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // generate shape number

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       int shape =3D generator.nextInt(6= );

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       DateFormat dateFormat =3D new Sim= pleDateFormat(

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p; "yyyy/MM/dd HH:mm:ss");

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Date date =3D new Date();

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       out.println(dateFormat.format(dat= e) + " the shape number "

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p; + shape + "  is processing " + thread);<= /o:p>

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session =3D new Util().login(repo= sitory);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // produce shapes and store in th= e repository

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Shapes.produce(session.getRootNod= e(), shape, thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // make changes persistent

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session.save();=

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // session logout

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       new Util().logout(session);<= /o:p>

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // make new session

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session =3D new Util().login(repo= sitory);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // consume shapes

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Shapes.consume(session.getRootNod= e(), shape, thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // session logout

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       new Util().logout(session);<= /o:p>

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // session login

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session =3D new Util().login(repo= sitory);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // delete shapes

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Shapes.delete(session.getRootNode= (), shape, thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       // make changes persistent

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session.save();=

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       new Util().logout(session);<= /o:p>

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    } catch (Exception e) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       e.printStackTrace();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    } finally {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       if (session !=3D null && = session.isLive()) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;          new Util().logout(= session);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;             = }

 

     &= nbsp;          }

 

     &= nbsp;          public static c= lass Shapes {

 

     &= nbsp;           &nbs= p;             = public static synchronized void produce(Node root, int shape,

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       String thread) throws Exception {=

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape =3D=3D 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape1 =3D root.addNode(&quo= t;shape1" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape1.addNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.addNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.addNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("g" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape2 =3D root.addNode(&quo= t;shape2" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape2.addNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.addNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.addNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 2) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape3 =3D root.addNode(&quo= t;shape3" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape3.addNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.addNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.addNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 3) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape4 =3D root.addNode(&quo= t;shape4" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape4.addNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.addNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.addNode("b"= ; + thread);

     &= nbsp;            &nb= sp;            =             &nb= sp;            =        b.addNode("f" + thread);=

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 4) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape5 =3D root.addNode(&quo= t;shape5" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape5.addNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.addNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.addNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.addNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;             = }

 

     &= nbsp;           &nbs= p;             = public static synchronized void consume(Node root, int shape,

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       String thread) throws Exception {=

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape =3D=3D 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape1 =3D root.getNode(&quo= t;shape1" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape1.getNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.getNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.getNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("g" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape2 =3D root.getNode(&quo= t;shape2" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape2.getNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.getNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.getNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 2) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape3 =3D root.getNode(&quo= t;shape3" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape3.getNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.getNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.addNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.getNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 3) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape4 =3D root.getNode(&quo= t;shape4" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape4.getNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.getNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.getNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 4) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node shape5 =3D root.getNode(&quo= t;shape5" + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node a =3D shape5.getNode("a= " + thread);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node c =3D a.getNode("c"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("d" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       c.getNode("e" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       Node b =3D a.getNode("b"= ; + thread);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("f" + thr= ead);

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       b.getNode("g" + thr= ead);

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;             = }

 

     &= nbsp;           &nbs= p;             = public static synchronized void delete(Node root, int shape,

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       String thread) throws Exception {=

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape =3D=3D 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       root.getNode("shape1" &= #43; thread).remove();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 1) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       root.getNode("shape2" &= #43; thread).remove();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 2) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       root.getNode("shape3" &= #43; thread).remove();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 3) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       root.getNode("shape4" &= #43; thread).remove();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    if (shape > 4) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       root.getNode("shape5" &= #43; thread).remove();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

 

     &= nbsp;           &nbs= p;             = }

     &= nbsp;          }

 

     &= nbsp;          public class Ut= il {

 

     &= nbsp;           &nbs= p;             = public Session login(Repository repository) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    Session session =3D null;

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    try {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       session =3D repository.login(new = SimpleCredentials("admin",

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p; "admin".toCharArray()));

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    } catch (LoginException e) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       e.printStackTrace();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    } catch (RepositoryException e) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;            &= nbsp;       e.printStackTrace();

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    }

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    return session;

 

     &= nbsp;           &nbs= p;             = }

 

     &= nbsp;           &nbs= p;             = public void logout(Session session) {

     &= nbsp;           &nbs= p;            &= nbsp;           &nbs= p;    session.logout();

     &= nbsp;           &nbs= p;             = }

 

     &= nbsp;          }

 

}

--_000_20EA666EE514B744BE0BFC09B4096987010622C9RSX01RStylecom_--