jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r928437 [3/3] - in /jackrabbit/sandbox/jackrabbit-j3: ./ src/main/java/org/apache/jackrabbit/j3/ src/main/java/org/apache/jackrabbit/j3/lock/ src/main/java/org/apache/jackrabbit/j3/mc/ src/main/java/org/apache/jackrabbit/j3/mc/jdbc/ src/mai...
Date Sun, 28 Mar 2010 15:43:20 GMT
Added: jackrabbit/sandbox/jackrabbit-j3/src/site/resources/images/drawing.svg
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/site/resources/images/drawing.svg?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/site/resources/images/drawing.svg (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/site/resources/images/drawing.svg Sun Mar 28 15:43:18 2010
@@ -0,0 +1,572 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="drawing.svg"
+   inkscape:export-filename="/Users/tmueller/drawing.png"
+   inkscape:export-xdpi="48.380001"
+   inkscape:export-ydpi="48.380001">
+  <defs
+     id="defs4">
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3831">
+      <stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop3833" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3835" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3944">
+      <stop
+         style="stop-color:#dfdfdf;stop-opacity:1;"
+         offset="0"
+         id="stop3946" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="1"
+         id="stop3948" />
+    </linearGradient>
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective2839"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2853"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2888"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2915"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2943"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective2975"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3014"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3101"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3128"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3156"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3944"
+       id="linearGradient3950"
+       x1="413.78574"
+       y1="1247.1479"
+       x2="-93.785728"
+       y2="159.50508"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.60164345,0,0,0.73185485,220.3087,21.480661)" />
+    <inkscape:perspective
+       id="perspective3697"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3724"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3751"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3782"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <inkscape:perspective
+       id="perspective3817"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3831"
+       id="linearGradient3837"
+       x1="32.854668"
+       y1="635.71545"
+       x2="744.08076"
+       y2="635.71545"
+       gradientUnits="userSpaceOnUse" />
+    <filter
+       inkscape:collect="always"
+       id="filter3845">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="12.32886"
+         id="feGaussianBlur3847" />
+    </filter>
+    <inkscape:perspective
+       id="perspective3870"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <filter
+       inkscape:collect="always"
+       id="filter3878"
+       x="-0.04546406"
+       width="1.0909281"
+       y="-0.18568184"
+       height="1.3713637">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="8.8512327"
+         id="feGaussianBlur3880" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter3910">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="3.8240589"
+         id="feGaussianBlur3912" />
+    </filter>
+    <filter
+       inkscape:collect="always"
+       id="filter3946">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="4.1940534"
+         id="feGaussianBlur3948" />
+    </filter>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.66873709"
+     inkscape:cx="256.23266"
+     inkscape:cy="646.80961"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:window-width="1440"
+     inkscape:window-height="852"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       rx="39.400002"
+       y="208.241"
+       x="29.427359"
+       height="729.76379"
+       width="688.05511"
+       id="rect3839"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3845)" />
+    <rect
+       style="fill:url(#linearGradient3950);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3170"
+       width="688.05511"
+       height="729.76379"
+       x="23.8822"
+       y="204.08212"
+       rx="39.400002" />
+    <rect
+       rx="23.690449"
+       y="657.06787"
+       x="62.296535"
+       height="257.26605"
+       width="625.69257"
+       id="rect3882"
+       style="fill:#644600;fill-opacity:1;stroke:#000000;stroke-width:1.28393507;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3946)" />
+    <rect
+       rx="23.700001"
+       y="323.8233"
+       x="60.15527"
+       height="251.57126"
+       width="627.96228"
+       id="rect3884"
+       style="fill:#3b0000;fill-opacity:1;stroke:#000000;stroke-width:1.0269829;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3910)" />
+    <rect
+       style="fill:#ffb200;fill-opacity:1;stroke:#000000;stroke-width:1.28393507;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3757"
+       width="625.69257"
+       height="257.26605"
+       x="58.137669"
+       y="651.52271"
+       rx="23.690449" />
+    <rect
+       rx="23.700001"
+       y="27.575569"
+       x="219.74333"
+       height="114.40515"
+       width="467.24728"
+       id="rect3876"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3878)" />
+    <rect
+       y="822.29254"
+       x="439.7944"
+       height="70.267014"
+       width="224.79643"
+       id="rect3788"
+       style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.27992463;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       rx="21.82123" />
+    <rect
+       style="fill:#ff0000;fill-opacity:1;stroke:#000000;stroke-width:1.0269829;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3759"
+       width="627.96228"
+       height="251.57126"
+       x="55.996403"
+       y="318.27814"
+       rx="23.700001" />
+    <rect
+       style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.23394859;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect3674"
+       width="209.09579"
+       height="70.213562"
+       x="222.44023"
+       y="823.32568"
+       rx="23.700001" />
+    <rect
+       style="fill:#0048ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="rect2859"
+       width="467.24728"
+       height="114.40515"
+       x="215.58446"
+       y="22.030411"
+       rx="23.700001" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="245.14754"
+       y="90.5858"
+       id="text2861"><tspan
+         sodipodi:role="line"
+         id="tspan2863"
+         x="245.14754"
+         y="90.5858">App</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="62.45303"
+       y="286.31436"
+       id="text2949"><tspan
+         sodipodi:role="line"
+         id="tspan2951"
+         x="62.45303"
+         y="286.31436">Jackrabbit 3</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="75.719078"
+       y="703.97876"
+       id="text2985"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2987"
+         x="75.719078"
+         y="703.97876">Micro </tspan><tspan
+         sodipodi:role="line"
+         x="75.719078"
+         y="743.97876"
+         id="tspan3952">Kernel</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="78.379486"
+       y="366.26154"
+       id="text2989"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan2991"
+         x="78.379486"
+         y="366.26154">Core</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.87801"
+       y="705.23621"
+       id="text3020"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3022"
+         x="243.87801"
+         y="705.23621">Storage</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="246.70222"
+       y="179.09171"
+       id="text3024"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3026"
+         x="246.70222"
+         y="179.09171">JCR API</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.10457"
+       y="619.8031"
+       id="text3028"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3030"
+         x="243.10457"
+         y="619.8031">Micro Kernel API</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.87801"
+       y="750.22107"
+       id="text3032"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3034"
+         x="243.87801"
+         y="750.22107">StorageSession</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="465.52194"
+       y="705.79871"
+       id="text3036"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3038"
+         x="465.52194"
+         y="705.79871">NodeData</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="465.52194"
+       y="465.74747"
+       id="text3040"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3042"
+         x="465.52194"
+         y="465.74747">NodeState</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="465.52194"
+       y="791.00354"
+       id="text3044"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3046"
+         x="465.52194"
+         y="791.00354">Bundle</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="467.68991"
+       y="750.22107"
+       id="text3048"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3050"
+         x="467.68991"
+         y="750.22107">Val</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.10457"
+       y="459.54434"
+       id="text3052"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3054"
+         x="243.10457"
+         y="459.54434">NodeImpl</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.87801"
+       y="414.09412"
+       id="text3056"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3058"
+         x="243.87801"
+         y="414.09412">SessionImpl</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="243.10457"
+       y="368.64398"
+       id="text3060"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3062"
+         x="243.10457"
+         y="368.64398">RepositoryImpl</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="80.399834"
+       y="412.27417"
+       id="text3064"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3066"
+         x="80.399834"
+         y="412.27417">j3</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="78.57618"
+       y="783.81055"
+       id="text3068"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3070"
+         x="78.57618"
+         y="783.81055">j3.mc</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="245.12196"
+       y="867.26056"
+       id="text3072"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3074"
+         x="245.12196"
+         y="867.26056">j3.mc.jdbc</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:32px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="467.53934"
+       y="867.26056"
+       id="text3076"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3078"
+         x="467.53934"
+         y="867.26056">j3.mc.mem</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="466.52975"
+       y="368.64398"
+       id="text3162"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3164"
+         x="466.52975"
+         y="368.64398">Change</tspan></text>
+    <text
+       xml:space="preserve"
+       style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
+       x="466.52975"
+       y="418.74646"
+       id="text3166"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3168"
+         x="466.52975"
+         y="418.74646">Cache</tspan></text>
+  </g>
+</svg>

Added: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/Profiler.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/Profiler.java?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/Profiler.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/Profiler.java Sun Mar 28 15:43:18 2010
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.j3;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import org.h2.engine.Constants;
+import org.h2.util.New;
+
+/**
+ * A simple CPU profiling tool similar to java -Xrunhprof.
+ */
+public class Profiler implements Runnable {
+    private static final int MAX_ELEMENTS = 1000;
+
+    public int interval = 50;
+    public int depth = 16;
+
+    private String[] ignoreLines = arraySplit("", ',', true);
+    private String[] ignoreThreads = arraySplit(
+            "java.lang.Thread.dumpThreads," +
+            "java.net.PlainSocketImpl.socketAccept," +
+            "java.net.SocketInputStream.socketRead0," +
+            "java.net.SocketOutputStream.socketWrite0," +
+            "java.lang.UNIXProcess.waitForProcessExit," +
+            "java.lang.Object.wait," +
+            "java.lang.Thread.sleep," +
+            "sun.awt.windows.WToolkit.eventLoop,"
+            , ',', true);
+    private volatile boolean stop;
+    private HashMap<String, Integer> counts = new HashMap<String, Integer>();
+    private int minCount = 1;
+    private int total;
+    private Thread thread;
+    private long time;
+
+    /**
+     * Start collecting profiling data.
+     */
+    public void startCollecting() {
+        thread = new Thread(this);
+        thread.setName("Profiler");
+        thread.setDaemon(true);
+        thread.start();
+    }
+
+    /**
+     * Stop collecting.
+     */
+    public void stopCollecting() {
+        stop = true;
+        if (thread != null) {
+            try {
+                thread.join();
+            } catch (InterruptedException e) {
+                // ignore
+            }
+            thread = null;
+        }
+    }
+
+    public void run() {
+        time = System.currentTimeMillis();
+        while (!stop) {
+            try {
+                tick();
+            } catch (Throwable t) {
+                break;
+            }
+        }
+        time = System.currentTimeMillis() - time;
+    }
+
+    private void tick() {
+        if (interval > 0) {
+            try {
+                Thread.sleep(interval);
+            } catch (Exception e) {
+                // ignore
+            }
+        }
+        Map<Thread, StackTraceElement[]> map = Thread.getAllStackTraces();
+        for (Map.Entry<Thread, StackTraceElement[]> entry : map.entrySet()) {
+            Thread t = entry.getKey();
+            if (t.getState() != Thread.State.RUNNABLE) {
+                continue;
+            }
+            StackTraceElement[] dump = entry.getValue();
+            if (dump.length == 0) {
+                continue;
+            }
+            boolean ignoreThis = false;
+            for (String ig : ignoreThreads) {
+                if (ig.length() > 0 && dump[0].toString().startsWith(ig)) {
+                    ignoreThis = true;
+                    break;
+                }
+            }
+            if (ignoreThis) {
+                continue;
+            }
+            StringBuilder buff = new StringBuilder();
+            // simple recursive calls are ignored
+            String last = null;
+            for (int j = 0, i = 0; i < dump.length && j < depth; i++) {
+                String el = dump[i].toString();
+                ignoreThis = false;
+                for (String ig : ignoreLines) {
+                    if (ig.length() > 0 && el.startsWith(ig)) {
+                        ignoreThis = true;
+                        break;
+                    }
+                }
+                if (!ignoreThis && !el.equals(last)) {
+                    last = el;
+                    buff.append("at ").append(el).append('\n');
+                    j++;
+                }
+            }
+            if (buff.length() > 0) {
+                increment(buff.toString());
+            }
+        }
+    }
+
+    private void increment(String trace) {
+        total++;
+        Integer oldCount = counts.get(trace);
+        if (oldCount == null) {
+            counts.put(trace, 1);
+        } else {
+            counts.put(trace, oldCount + 1);
+        }
+        if (counts.size() > MAX_ELEMENTS) {
+            for (Iterator<Map.Entry<String, Integer>> ei = counts.entrySet().iterator(); ei.hasNext();) {
+                Map.Entry<String, Integer> e = ei.next();
+                if (e.getValue() <= minCount) {
+                    ei.remove();
+                }
+            }
+            if (counts.size() > MAX_ELEMENTS) {
+                minCount++;
+            }
+        }
+    }
+
+    /**
+     * Get the top stack traces.
+     *
+     * @param count the maximum number of stack traces
+     * @return the stack traces.
+     */
+    public String getTop(int count) {
+        StringBuilder buff = new StringBuilder();
+        buff.append("Profiler: top ").append(count).append(" stack trace(s) of ").append(time).
+            append(" ms [build-").append(Constants.BUILD_ID).append("]\n");
+        for (int x = 0, min = 0;;) {
+            int highest = 0;
+            Map.Entry<String, Integer> best = null;
+            for (Map.Entry<String, Integer> el : counts.entrySet()) {
+                if (el.getValue() > highest) {
+                    best = el;
+                    highest = el.getValue();
+                }
+            }
+            if (best == null) {
+                break;
+            }
+            counts.remove(best.getKey());
+            if (++x >= count) {
+                if (best.getValue() < min) {
+                    break;
+                }
+                min = best.getValue();
+            }
+            buff.append(best.getValue()).append('/').append(total).
+                append('\n').append(best.getKey());
+        }
+        buff.append('.');
+        return buff.toString();
+    }
+
+    /**
+     * Split a string into an array of strings using the given separator. A null
+     * string will result in a null array, and an empty string in a zero element
+     * array.
+     *
+     * @param s the string to split
+     * @param separatorChar the separator character
+     * @param trim whether each element should be trimmed
+     * @return the array list
+     */
+    public static String[] arraySplit(String s, char separatorChar, boolean trim) {
+        if (s == null) {
+            return null;
+        }
+        if (s.length() == 0) {
+            return new String[0];
+        }
+        ArrayList<String> list = New.arrayList();
+        StringBuilder buff = new StringBuilder(s.length());
+        for (int i = 0; i < s.length(); i++) {
+            char c = s.charAt(i);
+            if (c == separatorChar) {
+                String e = buff.toString();
+                list.add(trim ? e.trim() : e);
+                buff.setLength(0);
+            } else if (c == '\\' && i < s.length() - 1) {
+                buff.append(s.charAt(++i));
+            } else {
+                buff.append(c);
+            }
+        }
+        String e = buff.toString();
+        list.add(trim ? e.trim() : e);
+        String[] array = new String[list.size()];
+        list.toArray(array);
+        return array;
+    }
+
+}

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestAll.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestAll.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestAll.java Sun Mar 28 15:43:18 2010
@@ -19,6 +19,9 @@ package org.apache.jackrabbit.j3;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+/**
+ * Runs all tests.
+ */
 public class TestAll {
 
     /**
@@ -32,10 +35,14 @@ public class TestAll {
         TestSuite suite = new TestSuite("org.apache.jackrabbit.j3");
 
         suite.addTestSuite(TestBundle.class);
+        suite.addTestSuite(TestNamespaceRegistry.class);
+        suite.addTestSuite(TestNodeTypeRegistry.class);
 
-        for (int i=0; i<2; i++) {
+        for (int i = 0; i < TestBase.URL.length; i++) {
             suite.addTestSuite(TestConcurrentWrite.class);
+            suite.addTestSuite(TestLock.class);
             suite.addTestSuite(TestSimple.class);
+            suite.addTestSuite(TestObservation.class);
             suite.addTestSuite(TestNextConfiguration.class);
         }
 

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBase.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBase.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBase.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBase.java Sun Mar 28 15:43:18 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.j3;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 import javax.jcr.LoginException;
@@ -25,19 +26,26 @@ import javax.jcr.RepositoryFactory;
 import javax.jcr.Session;
 import javax.jcr.SimpleCredentials;
 import junit.framework.TestCase;
+import org.apache.commons.io.FileUtils;
 
+/**
+ * The base class for the tests.
+ */
 public class TestBase extends TestCase {
 
     protected static int configurationId;
 
-    private Repository repository;
-    protected Session session;
-    private static final String[] URL = new String[] {
+    public static final String[] URL = new String[] {
+        "jdbc:h2:target/repos/test",
         "mem:",
-        "jdbc:h2:mem:test"
+        "jdbc:h2:mem:test",
     };
 
+    private Repository repository;
+    protected Session session;
+
     public void setUp() throws Exception {
+        FileUtils.deleteDirectory(new File("target/repos"));
         String factoryClass = "org.apache.jackrabbit.j3.RepositoryFactoryImpl";
         String url = URL[configurationId];
         RepositoryFactory factory = (RepositoryFactory) Class.forName(factoryClass).newInstance();

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBundle.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBundle.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestBundle.java Sun Mar 28 15:43:18 2010
@@ -21,8 +21,26 @@ import junit.framework.TestCase;
 import org.apache.jackrabbit.j3.mc.Bundle;
 import org.apache.jackrabbit.j3.mc.Val;
 
+/**
+ * Tests the bundle format.
+ */
 public class TestBundle extends TestCase {
 
+    public void testVal() {
+        Val x = Val.get(Val.get(20));
+        x = x.addOrdered(Val.get(10));
+        x = x.addOrdered(Val.get(30));
+        x = x.addOrdered(Val.get(15));
+        x = x.addOrdered(Val.get(25));
+        assertEquals(Val.get(Val.get(10), Val.get(15), Val.get(20), Val.get(25), Val.get(30)), x);
+        x = x.removeOrdered(Val.get(15));
+        x = x.removeOrdered(Val.get(30));
+        x = x.removeOrdered(Val.get(10));
+        x = x.removeOrdered(Val.get(20));
+        x = x.removeOrdered(Val.get(25));
+        assertEquals(Val.get(), x);
+    }
+
     public void testBundle() {
         Bundle bundle = Bundle.create(512);
         bundle.writeVal(Val.get("Hello")).writeVal(Val.get("World"));
@@ -65,8 +83,11 @@ public class TestBundle extends TestCase
         testLength(Val.get("long string with strange characters äöü \u1234"));
         testLength(Val.get(new byte[1024]));
         testLength(Val.get(new byte[1024 * 1024]));
-        testLength(true, Val.get(new Val[]{Val.get("Hello World 1"), Val.get("Hello World 2"), Val.get("Hello World 3")}));
-        testLength(true, Val.get(new Val[]{Val.get("Hello World 1"), Val.get("Hello World 1"), Val.get("Hello World 1")}));
+        testLength(true, Val.get(Val.get("Hello World 1"), Val.get("Hello World 2"), Val.get("Hello World 3")));
+        testLength(true, Val.get(Val.get("Hello World 1"), Val.get("Hello World 1"), Val.get("Hello World 1")));
+        testLength(Val.get());
+        testLength(Val.get(Val.get(1), Val.get(2), Val.get(3)));
+        testLength(Val.get(Val.get(1), Val.get(2), Val.get(3), Val.get(4)));
     }
 
     static void testLength(Val v) {

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestConcurrentWrite.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestConcurrentWrite.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestConcurrentWrite.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestConcurrentWrite.java Sun Mar 28 15:43:18 2010
@@ -25,6 +25,9 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+/**
+ * Tests concurrently writing to the same node.
+ */
 public class TestConcurrentWrite extends TestBase {
 
    private String parentUUID;
@@ -51,10 +54,8 @@ public class TestConcurrentWrite extends
        session.logout();
    }
 
-
-
    public void testConcurrency() throws Exception {
-       int threadCount = 20;
+       int threadCount = 5;
        final List<Exception> exceptions = new ArrayList<Exception>();
        final CountDownLatch latch = new CountDownLatch(threadCount);
        for (int i = 0; i < threadCount; i++) {

Added: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestLock.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestLock.java?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestLock.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestLock.java Sun Mar 28 15:43:18 2010
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.j3;
+
+import javax.jcr.Node;
+import javax.jcr.Session;
+import javax.jcr.lock.LockException;
+import javax.jcr.lock.LockManager;
+
+/**
+ * Tests JCR locking.
+ */
+public class TestLock extends TestBase {
+
+    public void test() throws Exception {
+        Node n = session.getRootNode().addNode("testLock");
+        n.addMixin("mix:lockable");
+        session.save();
+        LockManager lockManager = session.getWorkspace().getLockManager();
+        lockManager.lock("/testLock", false, false, 0, "test");
+        Session session2 = openSession();
+        Node n2 = session2.getNode("/testLock");
+        try {
+            n2.addNode("test");
+            fail();
+        } catch (LockException e) {
+            // expected
+        }
+        session2.logout();
+    }
+}

Added: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNamespaceRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNamespaceRegistry.java?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNamespaceRegistry.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNamespaceRegistry.java Sun Mar 28 15:43:18 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.j3;
+
+import javax.jcr.NamespaceRegistry;
+import javax.jcr.RepositoryException;
+
+/**
+ * Tests the namespace registry.
+ */
+public class TestNamespaceRegistry extends TestBase {
+
+    public void test() throws RepositoryException {
+        NamespaceRegistry registry = session.getWorkspace().getNamespaceRegistry();
+        assertEquals("", registry.getPrefix(""));
+        assertEquals(NamespaceRegistry.NAMESPACE_NT, registry.getURI("nt"));
+        assertEquals(NamespaceRegistry.PREFIX_MIX, registry.getPrefix(NamespaceRegistry.NAMESPACE_MIX));
+        registry.registerNamespace("test", "TEST");
+        assertEquals("TEST", registry.getURI("test"));
+    }
+
+}

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNextConfiguration.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNextConfiguration.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNextConfiguration.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNextConfiguration.java Sun Mar 28 15:43:18 2010
@@ -1,5 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.jackrabbit.j3;
 
+/**
+ * A test that switches to the next test configuration.
+ */
 public class TestNextConfiguration extends TestBase {
 
     public void testChange() {

Added: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNodeTypeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNodeTypeRegistry.java?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNodeTypeRegistry.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestNodeTypeRegistry.java Sun Mar 28 15:43:18 2010
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law
+ * or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the specific language
+ * governing permissions and limitations under the License.
+ */
+package org.apache.jackrabbit.j3;
+
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.nodetype.NodeType;
+
+/**
+ * Tests the node type registry.
+ */
+public class TestNodeTypeRegistry extends TestBase {
+
+    public void test() throws RepositoryException {
+        Node n = session.getRootNode().addNode("testNodeType");
+        NodeType nt = n.getPrimaryNodeType();
+        assertEquals("nt:unstructured", nt.getName());
+//        NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
+//        NodeTypeIterator it = ntm.getAllNodeTypes();
+//        while (it.hasNext()) {
+//            nt = it.nextNodeType();
+//            System.out.println(nt.getName());
+//        }
+    }
+}

Added: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestObservation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestObservation.java?rev=928437&view=auto
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestObservation.java (added)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestObservation.java Sun Mar 28 15:43:18 2010
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.j3;
+
+import java.util.ArrayList;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventIterator;
+import javax.jcr.observation.EventListener;
+
+/**
+ * Tests observation.
+ */
+public class TestObservation extends TestBase {
+
+    private ArrayList<String> eventList = new ArrayList<String>();
+
+    public void test() throws Exception {
+        session.getRootNode().addNode("t");
+        session.save();
+        session.getWorkspace().getObservationManager().addEventListener(new TestEventListener(),
+                Event.NODE_ADDED | Event.NODE_REMOVED |
+                Event.PROPERTY_ADDED | Event.PROPERTY_CHANGED |
+                Event.PROPERTY_REMOVED, "/", true, null, null, false);
+
+        Session session2 = openSession();
+        Node n2 = session2.getNode("/t");
+        session2.getWorkspace().getObservationManager().setUserData("x");
+        n2.addNode("test");
+        session2.save();
+        session2.logout();
+
+        assertEquals(2, eventList.size());
+        assertEquals("[/t/test/jcr:primaryType:4:x, /t/test:1:x]", eventList.toString());
+    }
+
+    /**
+     * An event listener.
+     */
+    class TestEventListener implements EventListener {
+
+        public void onEvent(EventIterator events) {
+            while (events.hasNext()) {
+                Event event = events.nextEvent();
+                String s;
+                try {
+                    s = event.getPath() + ":" + event.getType() + ":" + event.getUserData();
+                } catch (RepositoryException e) {
+                    s = e.toString();
+                }
+                eventList.add(s);
+            }
+        }
+
+    }
+}

Modified: jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestSimple.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestSimple.java?rev=928437&r1=928436&r2=928437&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestSimple.java (original)
+++ jackrabbit/sandbox/jackrabbit-j3/src/test/java/org/apache/jackrabbit/j3/TestSimple.java Sun Mar 28 15:43:18 2010
@@ -20,8 +20,13 @@ import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+/**
+ * A simple test case.
+ */
 public class TestSimple extends TestBase {
 
+    long start;
+
     public void test() throws Exception {
 
         Session session = openSession();
@@ -55,30 +60,66 @@ public class TestSimple extends TestBase
 
     private void createReadNodes() throws RepositoryException {
         Node root = session.getRootNode();
-        int max = 10, saveEvery = 1000, count = 0;
-        for(int i=0; i<max; i++) {
-            Node ni = root.addNode("test" + i);
-            for(int j=0; j<max; j++) {
-                Node nj = ni.addNode("test" + j);
-                for(int k=0; k<max; k++) {
-                    Node x = nj.addNode("test" + k);
-                    x.setProperty("value", i + "_" + j + "_" + k);
-                    if (count++ % saveEvery == 0) {
-                        session.save();
-                    }
-                }
-            }
+        // 488280 nodes:
+        // int size = 5, recurse = 7;
+        int size = 3, recurse = 4;
+        String url = session.getRepository().getDescriptor("url");
+        if (url == null) {
+            // jackrabbit core
+        } else if (url.startsWith("mem:")) {
+            // 111110 nodes:
+            // size = 10;
+            // recurse = 4;
+        } else if (url.indexOf(":mem:") > 0) {
+            size = 5;
+            recurse = 4;
+        }
+        int expectedNodes = (int) Math.pow(size, recurse + 2) / (size - 1) - 1;
+        Profiler prof = null;
+        if (expectedNodes > 100000) {
+            prof = new Profiler();
+            prof.startCollecting();
+            System.out.println("count: " + expectedNodes);
         }
+        start = System.currentTimeMillis();
+        int nodeCount = createNodes(root, size, recurse, 0, 10000);
+        assertEquals(expectedNodes, nodeCount);
         session.save();
-        for(int i=0; i<max; i++) {
-            for(int j=0; j<max; j++) {
-                for(int k=0; k<max; k++) {
-                    String s = "/test" + i + "/test" + j + "/test" + k;
-                    Node x = session.getNode(s);
-                    String v = x.getProperty("value").getString();
-                    assertEquals(i + "_" + j + "_" + k, v);
-                }
+        start = System.currentTimeMillis();
+        readNodes(root, size, recurse, 0, 10000);
+        if (prof != null) {
+            System.out.println(prof.getTop(3));
+        }
+    }
+
+    private int createNodes(Node root, int size, int recurse, int x, int saveEvery) throws RepositoryException {
+        for (int i = 0; i < size; i++) {
+            Node n = root.addNode("test" + i);
+            x++;
+            if (x % saveEvery == 0) {
+                n.getSession().save();
+                long time = System.currentTimeMillis() - start;
+                System.out.println("saved: " + x + " " + (int)(x * 1000. / time) + " nodes/s");
+            }
+            if (recurse > 0) {
+                x = createNodes(n, size, recurse - 1, x, saveEvery);
+            }
+        }
+        return x;
+    }
+
+    private int readNodes(Node root, int size, int recurse, int x, int showEvery) throws RepositoryException {
+        for (int i = 0; i < size; i++) {
+            Node n = root.getNode("test" + i);
+            x++;
+            if (x % showEvery == 0) {
+                long time = System.currentTimeMillis() - start;
+                System.out.println("read: " + x + " " + (int)(x * 1000. / time) + " nodes/s");
+            }
+            if (recurse > 0) {
+                x = readNodes(n, size, recurse - 1, x, showEvery);
             }
         }
+        return x;
     }
 }



Mime
View raw message