<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>users@jackrabbit.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/"/>
<id>http://mail-archives.apache.org/mod_mbox/jackrabbit-users/</id>
<updated>2009-12-06T21:27:07Z</updated>
<entry>
<title>Re: JCR-SQL2 subtree query</title>
<author><name>Weston Bustraan &lt;wbustraan@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c55d5ad380912060707l25a9b0c8h843bdddafb1dc10c@mail.gmail.com%3e"/>
<id>urn:uuid:%3c55d5ad380912060707l25a9b0c8h843bdddafb1dc10c@mail-gmail-com%3e</id>
<updated>2009-12-06T15:07:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks! I tried using ISDESCENDANTNODE, but for some reason it wasn't
working. Using your syntax worked fine.

However, there seems to be a significant performance difference
between the same query in JCR-SQL2 and XPATH

So, for example, this comes back immediately:

/jcr:root/fm:profiles/com/gmail/wbustraan/*[@fm:session =
'3b7856fb-6a5d-427d-a7d6-00af15d7178a']

While this takes about 10 seconds:

select * from [nt:base] where
isdescendantnode([/fm:profiles/com/gmail/wbustraan]) and [fm:session]=
'3b7856fb-6a5d-427d-a7d6-00af15d7178a'

Is this a known issue with the new JCR-SQL2 queries or am I doing
something wrong?

On Fri, Dec 4, 2009 at 4:12 AM, Philipp Bunge &lt;buge@crimson.ch&gt; wrote:
&gt; Hi Wes
&gt;
&gt;&gt; I have a bit of a dilemma. I'm working with Jackrabbit 2.0b3 and
&gt;&gt; trying to migrate to JCR2.0. However, since the XPATH query syntax is
&gt;&gt; deprecated, I'm investigating how to go about writing queries in
&gt;&gt; JCR-SQL2. Unfortunately, I haven't come up with many examples or
&gt;&gt; tutorials for the new JCR-SQL2 syntax.
&gt;
&gt; There really aren't many tutorial around as far as I know. I use the
&gt; railroad diagrams that Thomas Müller created quite a lot as a
&gt; reference however: http://www.h2database.com/jcr/grammar.html
&gt;
&gt;&gt; One of the scenarios that I'd like to use frequently is searching a
&gt;&gt; subtree, i.e. starting at a particular node and searching all
&gt;&gt; descendants for certain property values. This is trivial to accomplish
&gt;&gt; in XPATH, but I can't figure out the correct (and efficient) way to do
&gt;&gt; it using SQL2. Can any one help me out with an example?
&gt;
&gt; You probably want something as follows:
&gt;
&gt; SELECT * FROM [nt:unstructured]
&gt;  WHERE ISDESCENDANTNODE([/the/particular/node])
&gt;  AND yourproperty = "foo"
&gt;
&gt;
&gt; Cheers,
&gt; Philipp
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with node type defs in JR1.6</title>
<author><name>Ian Boston &lt;ieb@tfd.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c867BDFD3-79C9-4C69-A570-6C5ABEF38E44@tfd.co.uk%3e"/>
<id>urn:uuid:%3c867BDFD3-79C9-4C69-A570-6C5ABEF38E44@tfd-co-uk%3e</id>
<updated>2009-12-05T16:58:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Problem solved.

setProperty with the right name but the wrong type will generate the  
exception.

javax.jcr.nodetype.ConstraintViolationException: no matching property  
definition found for {internal}privileges

I as trying to set a {internal}privileges with a Value[] containing  
String rather than Name

Ian



On 4 Dec 2009, at 18:51, Ian Boston wrote:

&gt; Hi,
&gt; I have a modified DefaultSecurityManager (and related classes) and I  
&gt; am certain I have made a mistake somewhere, but on initialization I  
&gt; get
&gt;
&gt; 04.12.2009 18:40:09.020 *ERROR* [SCR Component Actor]  
&gt; org 
&gt; .apache 
&gt; .sling.jcr.jackrabbit.server.impl.security.standard.ACLProvider  
&gt; Failed to set-up minimal access control for root node of workspace  
&gt; default javax.jcr.nodetype.ConstraintViolationException: no matching  
&gt; property definition found for {internal}privileges
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit 
&gt; .core 
&gt; .nodetype 
&gt; .EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java: 
&gt; 768)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit 
&gt; .core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:905)
&gt;        at  
&gt; org 
&gt; .apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java: 
&gt; 412)
&gt;        at  
&gt; org 
&gt; .apache.jackrabbit.core.NodeImpl.internalSetProperty(NodeImpl.java: 
&gt; 1444)
&gt;        at  
&gt; org 
&gt; .apache.jackrabbit.core.NodeImpl.internalSetProperty(NodeImpl.java: 
&gt; 1423)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit 
&gt; .core 
&gt; .DynamicProtectedItemModifier 
&gt; .setProperty(DynamicProtectedItemModifier.java:118)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .sling 
&gt; .jcr 
&gt; .jackrabbit 
&gt; .server.impl.security.standard.ACLEditor.setPolicy(ACLEditor.java:189)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .sling 
&gt; .jcr 
&gt; .jackrabbit 
&gt; .server 
&gt; .impl.security.standard.ACLProvider.initRootACL(ACLProvider.java:356)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .sling 
&gt; .jcr 
&gt; .jackrabbit 
&gt; .server.impl.security.standard.ACLProvider.init(ACLProvider.java:182)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .sling 
&gt; .jcr 
&gt; .jackrabbit 
&gt; .server 
&gt; .impl 
&gt; .security.dynamic.DynamicACLProvider.init(DynamicACLProvider.java:42)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .sling 
&gt; .jcr 
&gt; .jackrabbit 
&gt; .server 
&gt; .impl 
&gt; .security 
&gt; .dynamic 
&gt; .DynamicAccessControlProviderFactoryImpl 
&gt; .createProvider(DynamicAccessControlProviderFactoryImpl.java:103)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit 
&gt; .core 
&gt; .DynamicSecurityManager 
&gt; .getAccessControlProvider(DynamicSecurityManager.java:425)
&gt; at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit 
&gt; .core 
&gt; .DynamicSecurityManager.getAccessManager(DynamicSecurityManager.java: 
&gt; 280)
&gt;        at  
&gt; org 
&gt; .apache 
&gt; .jackrabbit.core.SessionImpl.createAccessManager(SessionImpl.java:384)
&gt;        at  
&gt; org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:302)
&gt;        at  
&gt; org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:271)
&gt;        at  
&gt; org.apache.jackrabbit.core.XASessionImpl.&lt;init&gt;(XASessionImpl.java: 
&gt; 105)
&gt;
&gt;
&gt; Any ideas why or where I can look to debug. ?
&gt;
&gt; I think the main difference up to this point is a change in package  
&gt; name for the ACLProvider other than that its standard. My extensions  
&gt; only relate to the construction of permissions bitmaps.
&gt;
&gt; The I believe the default node types have been registered since I  
&gt; see the log line
&gt; 04.12.2009 18:40:01.843 *INFO* [SCR Component Actor]  
&gt; org.apache.jackrabbit.core.nodetype.NodeTypeRegistry no custom node  
&gt; type definitions found
&gt;
&gt;
&gt; Ian
&gt;
&gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Filesystem versus PersistenceManager questions</title>
<author><name>Guo Du &lt;mrduguo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3ce2a35cbc0912041558i5babf3en1aa501f055ce812@mail.gmail.com%3e"/>
<id>urn:uuid:%3ce2a35cbc0912041558i5babf3en1aa501f055ce812@mail-gmail-com%3e</id>
<updated>2009-12-04T23:58:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Fri, Dec 4, 2009 at 11:28 PM, ChadDavis &lt;chadmichaeldavis@gmail.com&gt; wrote:
&gt; 1) I read elsewhere that the FS is only used for some administrative
&gt; stuff, like the search index and configuration.  Is this correct?  In
&gt; other words, the FS isn't a part of the storage for the actual repo
&gt; content, that's all done by the PM?
DataStore was used to store large node which is on FS. Large node
could be multimedia or large documents. Store in db is not recommended
even it could be easily store in db.

&gt; 2) It appears as if there is no good file system backed PM . . . is
Not sure day.com's TAR PM is based on file system or not. It's best so
far from what I read from the list.

&gt; this accurate?  The bundleFsPM is described as non-production, read
&gt; only.  So, this kind of means that the FS is NOT a choice for backing
&gt; the content of my repo, correct?
Default FS PM doesn't perform well and not transactional.

&gt; 3) Is the Derby PM considered production worthy?  Any reason not to use it?
Personal I trust derby as a low overhead database with zero
administration. It's not suitable if you have strong dba person which
she/he may lose job:) You may use other db if:
* Prepared to manage database.
* Multi connection required (embedded db using single connection always)
* Cluster your db
* Huge db size
* You application will use exist db along with jackrabbit

After you made decision, you could do some basic benchmark along with
your dataset to get a feeling of how it perform.

Good luck!

-Guo


</pre>
</div>
</content>
</entry>
<entry>
<title>jackrabbit configuration defaults</title>
<author><name>ChadDavis &lt;chadmichaeldavis@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4fe4c4f50912041539w317eb89bk1bdd8f29aeed33f3@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4fe4c4f50912041539w317eb89bk1bdd8f29aeed33f3@mail-gmail-com%3e</id>
<updated>2009-12-04T23:39:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I've just read through all of the configuration information on the
jackrabbit web site.  As far as I can tell, the default settings are
pretty solid.  I don't have any requirements for storing things in a
particular db.  I have application level security that will suffice
for now.

Maybe I'm missing something in my analysis.  Are there some obvious,
to a more experienced eye, points in the default repository.xml that
just aren't up to production snuff?


</pre>
</div>
</content>
</entry>
<entry>
<title>DataStore</title>
<author><name>ChadDavis &lt;chadmichaeldavis@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4fe4c4f50912041531s7a4aa9dbs805e8f78fd465f97@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4fe4c4f50912041531s7a4aa9dbs805e8f78fd465f97@mail-gmail-com%3e</id>
<updated>2009-12-04T23:31:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
In the default repository.xml, the datastore element is configured:

    &lt;DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/&gt;

Is this all that is needed for the PM to hand off binary storage to
the datastore?  There doesn't appear to be any "wiring" of the PM, or
the Workspace, to the data store element.  I guess it's global unless
overridden somewhere?


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Filesystem versus PersistenceManager questions</title>
<author><name>ChadDavis &lt;chadmichaeldavis@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4fe4c4f50912041529x52fbab4ewd11be304974bbae8@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4fe4c4f50912041529x52fbab4ewd11be304974bbae8@mail-gmail-com%3e</id>
<updated>2009-12-04T23:29:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
BTW, I'm using 2.0-beta3.

On Fri, Dec 4, 2009 at 4:28 PM, ChadDavis &lt;chadmichaeldavis@gmail.com&gt; wrote:
&gt; I'm reading the PersistenceManager FAQ [1].  There's a part where it
&gt; discusses "What combination of FS and PM is the best choice?"  In
&gt; reading through this section I have a couple of questions:
&gt;
&gt; 1) I read elsewhere that the FS is only used for some administrative
&gt; stuff, like the search index and configuration.  Is this correct?  In
&gt; other words, the FS isn't a part of the storage for the actual repo
&gt; content, that's all done by the PM?
&gt;
&gt; 2) It appears as if there is no good file system backed PM . . . is
&gt; this accurate?  The bundleFsPM is described as non-production, read
&gt; only.  So, this kind of means that the FS is NOT a choice for backing
&gt; the content of my repo, correct?
&gt;
&gt; 3) Is the Derby PM considered production worthy?  Any reason not to use it?
&gt;
&gt;
&gt; http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Filesystem versus PersistenceManager questions</title>
<author><name>ChadDavis &lt;chadmichaeldavis@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4fe4c4f50912041528v72dd03e6s238649457a70a597@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4fe4c4f50912041528v72dd03e6s238649457a70a597@mail-gmail-com%3e</id>
<updated>2009-12-04T23:28:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm reading the PersistenceManager FAQ [1].  There's a part where it
discusses "What combination of FS and PM is the best choice?"  In
reading through this section I have a couple of questions:

1) I read elsewhere that the FS is only used for some administrative
stuff, like the search index and configuration.  Is this correct?  In
other words, the FS isn't a part of the storage for the actual repo
content, that's all done by the PM?

2) It appears as if there is no good file system backed PM . . . is
this accurate?  The bundleFsPM is described as non-production, read
only.  So, this kind of means that the FS is NOT a choice for backing
the content of my repo, correct?

3) Is the Derby PM considered production worthy?  Any reason not to use it?


http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ


</pre>
</div>
</content>
</entry>
<entry>
<title>Problem with node type defs in JR1.6</title>
<author><name>Ian Boston &lt;ieb@tfd.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c9EEAC60A-AAB9-4044-8AC2-D8DF5479E5CD@tfd.co.uk%3e"/>
<id>urn:uuid:%3c9EEAC60A-AAB9-4044-8AC2-D8DF5479E5CD@tfd-co-uk%3e</id>
<updated>2009-12-04T18:51:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
I have a modified DefaultSecurityManager (and related classes) and I  
am certain I have made a mistake somewhere, but on initialization I get

04.12.2009 18:40:09.020 *ERROR* [SCR Component Actor]  
org 
.apache.sling.jcr.jackrabbit.server.impl.security.standard.ACLProvider  
Failed to set-up minimal access control for root node of workspace  
default javax.jcr.nodetype.ConstraintViolationException: no matching  
property definition found for {internal}privileges
         at  
org 
.apache 
.jackrabbit 
.core 
.nodetype 
.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:768)
         at  
org 
.apache 
.jackrabbit 
.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:905)
         at  
org.apache.jackrabbit.core.NodeImpl.getOrCreateProperty(NodeImpl.java: 
412)
         at  
org.apache.jackrabbit.core.NodeImpl.internalSetProperty(NodeImpl.java: 
1444)
         at  
org.apache.jackrabbit.core.NodeImpl.internalSetProperty(NodeImpl.java: 
1423)
         at  
org 
.apache 
.jackrabbit 
.core 
.DynamicProtectedItemModifier 
.setProperty(DynamicProtectedItemModifier.java:118)
         at  
org 
.apache 
.sling 
.jcr 
.jackrabbit 
.server.impl.security.standard.ACLEditor.setPolicy(ACLEditor.java:189)
         at  
org 
.apache 
.sling 
.jcr 
.jackrabbit 
.server 
.impl.security.standard.ACLProvider.initRootACL(ACLProvider.java:356)
         at  
org 
.apache 
.sling 
.jcr 
.jackrabbit 
.server.impl.security.standard.ACLProvider.init(ACLProvider.java:182)
         at  
org 
.apache 
.sling 
.jcr 
.jackrabbit 
.server 
.impl.security.dynamic.DynamicACLProvider.init(DynamicACLProvider.java: 
42)
         at  
org 
.apache 
.sling 
.jcr 
.jackrabbit 
.server 
.impl 
.security 
.dynamic 
.DynamicAccessControlProviderFactoryImpl 
.createProvider(DynamicAccessControlProviderFactoryImpl.java:103)
         at  
org 
.apache 
.jackrabbit 
.core 
.DynamicSecurityManager 
.getAccessControlProvider(DynamicSecurityManager.java:425)
  at  
org 
.apache 
.jackrabbit 
.core 
.DynamicSecurityManager.getAccessManager(DynamicSecurityManager.java: 
280)
         at  
org 
.apache 
.jackrabbit.core.SessionImpl.createAccessManager(SessionImpl.java:384)
         at  
org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:302)
         at  
org.apache.jackrabbit.core.SessionImpl.&lt;init&gt;(SessionImpl.java:271)
         at  
org.apache.jackrabbit.core.XASessionImpl.&lt;init&gt;(XASessionImpl.java:105)


Any ideas why or where I can look to debug. ?

I think the main difference up to this point is a change in package  
name for the ACLProvider other than that its standard. My extensions  
only relate to the construction of permissions bitmaps.

The I believe the default node types have been registered since I see  
the log line
04.12.2009 18:40:01.843 *INFO* [SCR Component Actor]  
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry no custom node  
type definitions found


Ian




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Using the AccessControlManager to set a policy</title>
<author><name>Ben Short &lt;ben@benshort.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4e4f46500912040751q497137bdvca5e5a3ece0699ff@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4e4f46500912040751q497137bdvca5e5a3ece0699ff@mail-gmail-com%3e</id>
<updated>2009-12-04T15:51:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; please take a look at the API and the specification.

thank you for your patience

i have it working now.

AccessControlPolicyIterator it =
adminAcm.getApplicablePolicies(testRootNode.getPath());
		while ( it.hasNext() ) {
			AccessControlPolicy acp = it.nextAccessControlPolicy();

			Privilege[] privileges = new
Privilege[]{adminAcm.privilegeFromName(Privilege.JCR_WRITE)};

			((AccessControlList)acp).addAccessControlEntry(new
PrincipalImpl(anonymous.getUserID()), privileges);


			adminAcm.setPolicy(testRootNode.getPath(), acp);
		}
		superuser.save();

Regards

Ben Short

2009/12/4 Angela Schreiber &lt;anchela@day.com&gt;
&gt;
&gt; please take a look at the API and the specification.
&gt;
&gt; - JCR 2.0 provides AccessControlList
&gt; - Jackrabbit API 2.0 in addition provides JackrabbitAccessControlList
&gt;  adding a couple of extensions.
&gt;
&gt; the implementation of the final JCR 2.0 will be available
&gt; as of JR 2.0.
&gt;
&gt; older versions of jackrabbit (1.5, 1.6) don't reflect
&gt; the latest version of the specification but intermediate
&gt; states. if you are talking about JCR 2.0, please make
&gt; sure, you refer to one of the jackrabbit 2.0-xyz releases.
&gt;
&gt; angela
&gt;
&gt; Ben Short wrote:
&gt;&gt;
&gt;&gt; Thanks Angela,
&gt;&gt;
&gt;&gt; Through a bit of trial and error I have the following which works as
&gt;&gt; expected.
&gt;&gt;
&gt;&gt; AccessControlPolicyIterator it =
&gt;&gt; adminAcm.getApplicablePolicies(testRootNode.getPath());
&gt;&gt; while ( it.hasNext() ) {
&gt;&gt; AccessControlPolicy acp = it.nextAccessControlPolicy();
&gt;&gt;
&gt;&gt; Privilege[] privileges = new
&gt;&gt; Privilege[]{adminAcm.privilegeFromName(Privilege.JCR_WRITE)};
&gt;&gt;
&gt;&gt; ((AbstractACLTemplate)acp).addEntry(new
&gt;&gt; PrincipalImpl(anonymous.getUserID()), privileges, true);
&gt;&gt;
&gt;&gt; adminAcm.setPolicy(testRootNode.getPath(), acp);
&gt;&gt;
&gt;&gt; }
&gt;&gt; superuser.save();
&gt;&gt;
&gt;&gt; It seems odd to me that I have to cast the AcessControlPolicy
&gt;&gt; to AbstractACLTemplate inorder, which is JackRabbit specific to add a new
&gt;&gt; entry. I wonder what the JCR 2 api dose not define an interface?
&gt;&gt;
&gt;&gt; Regards
&gt;&gt;
&gt;&gt; Ben Short
&gt;&gt;
&gt;&gt; 2009/12/4 Angela Schreiber &lt;anchela@day.com&gt;
&gt;&gt;
&gt;&gt;&gt; please take a look at the API.
&gt;&gt;&gt;
&gt;&gt;&gt; AccessControlManager#getApplicablePolicies
&gt;&gt;&gt;
&gt;&gt;&gt; -&gt; for policies that can but haven't yet been applied
&gt;&gt;&gt;
&gt;&gt;&gt; AccessControlManager#getPolicies
&gt;&gt;&gt;
&gt;&gt;&gt; -&gt; for policies that have been applied at a given path
&gt;&gt;&gt;  and can be removed again or edited/reapplied
&gt;&gt;&gt;
&gt;&gt;&gt; angela
&gt;&gt;&gt;
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Using the AccessControlManager to set a policy</title>
<author><name>Angela Schreiber &lt;anchela@day.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B192C1F.3060401@day.com%3e"/>
<id>urn:uuid:%3c4B192C1F-3060401@day-com%3e</id>
<updated>2009-12-04T15:34:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
please take a look at the API and the specification.

- JCR 2.0 provides AccessControlList
- Jackrabbit API 2.0 in addition provides JackrabbitAccessControlList
   adding a couple of extensions.

the implementation of the final JCR 2.0 will be available
as of JR 2.0.

older versions of jackrabbit (1.5, 1.6) don't reflect
the latest version of the specification but intermediate
states. if you are talking about JCR 2.0, please make
sure, you refer to one of the jackrabbit 2.0-xyz releases.

angela

Ben Short wrote:
&gt; Thanks Angela,
&gt; 
&gt; Through a bit of trial and error I have the following which works as
&gt; expected.
&gt; 
&gt; AccessControlPolicyIterator it =
&gt; adminAcm.getApplicablePolicies(testRootNode.getPath());
&gt; while ( it.hasNext() ) {
&gt; AccessControlPolicy acp = it.nextAccessControlPolicy();
&gt; 
&gt; Privilege[] privileges = new
&gt; Privilege[]{adminAcm.privilegeFromName(Privilege.JCR_WRITE)};
&gt; 
&gt; ((AbstractACLTemplate)acp).addEntry(new
&gt; PrincipalImpl(anonymous.getUserID()), privileges, true);
&gt; 
&gt; adminAcm.setPolicy(testRootNode.getPath(), acp);
&gt; 
&gt; }
&gt; superuser.save();
&gt; 
&gt; It seems odd to me that I have to cast the AcessControlPolicy
&gt; to AbstractACLTemplate inorder, which is JackRabbit specific to add a new
&gt; entry. I wonder what the JCR 2 api dose not define an interface?
&gt; 
&gt; Regards
&gt; 
&gt; Ben Short
&gt; 
&gt; 2009/12/4 Angela Schreiber &lt;anchela@day.com&gt;
&gt; 
&gt;&gt; please take a look at the API.
&gt;&gt;
&gt;&gt; AccessControlManager#getApplicablePolicies
&gt;&gt;
&gt;&gt; -&gt; for policies that can but haven't yet been applied
&gt;&gt;
&gt;&gt; AccessControlManager#getPolicies
&gt;&gt;
&gt;&gt; -&gt; for policies that have been applied at a given path
&gt;&gt;   and can be removed again or edited/reapplied
&gt;&gt;
&gt;&gt; angela
&gt;&gt;
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Using the AccessControlManager to set a policy</title>
<author><name>Ben Short &lt;ben@benshort.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4e4f46500912040720i21236b80ie72036a6606341a7@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4e4f46500912040720i21236b80ie72036a6606341a7@mail-gmail-com%3e</id>
<updated>2009-12-04T15:20:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thanks Angela,

Through a bit of trial and error I have the following which works as
expected.

AccessControlPolicyIterator it =
adminAcm.getApplicablePolicies(testRootNode.getPath());
while ( it.hasNext() ) {
AccessControlPolicy acp = it.nextAccessControlPolicy();

Privilege[] privileges = new
Privilege[]{adminAcm.privilegeFromName(Privilege.JCR_WRITE)};

((AbstractACLTemplate)acp).addEntry(new
PrincipalImpl(anonymous.getUserID()), privileges, true);

adminAcm.setPolicy(testRootNode.getPath(), acp);

}
superuser.save();

It seems odd to me that I have to cast the AcessControlPolicy
to AbstractACLTemplate inorder, which is JackRabbit specific to add a new
entry. I wonder what the JCR 2 api dose not define an interface?

Regards

Ben Short

2009/12/4 Angela Schreiber &lt;anchela@day.com&gt;

&gt; please take a look at the API.
&gt;
&gt; AccessControlManager#getApplicablePolicies
&gt;
&gt; -&gt; for policies that can but haven't yet been applied
&gt;
&gt; AccessControlManager#getPolicies
&gt;
&gt; -&gt; for policies that have been applied at a given path
&gt;   and can be removed again or edited/reapplied
&gt;
&gt; angela
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recommended way to take deal with JCR-1984</title>
<author><name>Felix Meschberger &lt;fmeschbe@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B191ACE.2000103@gmail.com%3e"/>
<id>urn:uuid:%3c4B191ACE-2000103@gmail-com%3e</id>
<updated>2009-12-04T14:21:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

Ian Boston schrieb:
&gt; Felix,
&gt; yes thank you,
&gt; got the update through which did as you say fix about 4 of the tests in
&gt; Sling (and found the sling jira now).
&gt; BTW I think the other problems I am having with {internal}privileges not
&gt; being defined are of my own making,

ok.

&gt; although I did notice the launch-pad
&gt; tests are using 2.0.4-incubator of JCR Base rather than 2.0.5-SNAPSHOT
&gt; which is in the code base so upgrading the JR API to 1.6 in the current
&gt; trunk wont flow through. (not that it fixes any of the remaining tests)

Yes, but this doesn't matter because the jcr/base module just provides
AccessControlUtil class, which is pure API calling. This doesn't matter
whether it is 1.5 or 1.6.

In fact updating the access manager dependency to the SNAPSHOT fixed the
tests (after fixing the access manager bundle).

Regards
Felix

... end of crossposting ;-)

&gt; Ian
&gt; 
&gt; (ccd dev@sling)
&gt; 
&gt; On 3 Dec 2009, at 20:46, Felix Meschberger wrote:
&gt; 
&gt;&gt; Hi Ian
&gt;&gt;
&gt;&gt; In fact I rewrote a Sling integration test just this morning exactly
&gt;&gt; doing such property setting for verification purposes (the test used to
&gt;&gt; check the rep:principalName property which is not available as such any
&gt;&gt; longer).
&gt;&gt;
&gt;&gt; Regards
&gt;&gt; Felix
&gt;&gt;
&gt;&gt; Ian Boston schrieb:
&gt;&gt;&gt; Angela,
&gt;&gt;&gt; Fantastic,
&gt;&gt;&gt; I misread the patch forgetting that * might be allowed.
&gt;&gt;&gt; Thank you.
&gt;&gt;&gt; Ian
&gt;&gt;&gt;
&gt;&gt;&gt; On 3 Dec 2009, at 17:44, Angela Schreiber wrote:
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; hi ian
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; JCR-1984 addressed a problem that protected properties defined
&gt;&gt;&gt;&gt; by the user/group node types were exposed by the #getPropertyNames
&gt;&gt;&gt;&gt; and #getProperty methods, although they could not be modified
&gt;&gt;&gt;&gt; by the corresponding set/remove methods.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; this issue should not affect additional, application specific
&gt;&gt;&gt;&gt; properties that were or will be stored with a user/group.
&gt;&gt;&gt;&gt; the nodetype still allows for
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; - * (UNDEFINED)
&gt;&gt;&gt;&gt; - * (UNDEFINED) multiple
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; and those props should be exposed by the mentioned methods.
&gt;&gt;&gt;&gt; i'm not aware of any change that would have broken this.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; angela
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Ian Boston wrote:
&gt;&gt;&gt;&gt;&gt; Hi,
&gt;&gt;&gt;&gt;&gt; IIUC [1], post 1.6 blocks an authorizable node from holding any
&gt;&gt;&gt;&gt;&gt; properties, other than those listed in the schema.
&gt;&gt;&gt;&gt;&gt; How do I add and retrieve a well defined set of properties for the
&gt;&gt;&gt;&gt;&gt; node as was possible in JR15 ?
&gt;&gt;&gt;&gt;&gt; We have an application that stores extra group and user metadata on
&gt;&gt;&gt;&gt;&gt; the authorizable node and I really don't want to have to rewrite it.
&gt;&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt;&gt; Ian
&gt;&gt;&gt;&gt;&gt; 1 https://issues.apache.org/jira/browse/JCR-1984
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt; 
&gt; 


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Using the AccessControlManager to set a policy</title>
<author><name>Angela Schreiber &lt;anchela@day.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B18F7E3.2010000@day.com%3e"/>
<id>urn:uuid:%3c4B18F7E3-2010000@day-com%3e</id>
<updated>2009-12-04T11:52:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
please take a look at the API.

AccessControlManager#getApplicablePolicies

-&gt; for policies that can but haven't yet been applied

AccessControlManager#getPolicies

-&gt; for policies that have been applied at a given path
    and can be removed again or edited/reapplied

angela


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Using the AccessControlManager to set a policy</title>
<author><name>Ben Short &lt;ben@benshort.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4e4f46500912040347h1acbc139y13f84c2463b2d9c9@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4e4f46500912040347h1acbc139y13f84c2463b2d9c9@mail-gmail-com%3e</id>
<updated>2009-12-04T11:47:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I have a really simple test case as follows:

public class UserManagerTests {
private Repository repository;
    private Session superuser;
private Session anonymous;
Node testRootNode;


@Before
    public void before() throws Exception {
        repository = new TransientRepository();
        superuser = repository.login(new SimpleCredentials("admin",
"admin".toCharArray()));
anonymous = repository.login(new SimpleCredentials("anonymous",
"anonymous".toCharArray()));
testRootNode = superuser.getRootNode().addNode("test_" +
Long.toString(System.currentTimeMillis()));
superuser.save();
}

    @After
    public void after() throws Exception {
testRootNode.remove();
superuser.save();
superuser.logout();
        superuser = null;
        repository = null;
    }

@Test
public void testUserManager() throws Exception {

AccessControlManager adminAcm = getAccessControlManager(superuser);
AccessControlManager anonAcm = getAccessControlManager(anonymous);

Assert.assertFalse(anonAcm.hasPrivileges(testRootNode.getPath(),
privilegesFromName(Privilege.JCR_WRITE)));

// something here to allow anon user to write to our test node
adminAcm.setPolicy(testRootNode.getPath(), policy);


Assert.assertTrue(anonAcm.hasPrivileges(testRootNode.getPath(),
privilegesFromName(Privilege.JCR_WRITE)));
}
}

How do I get/create a policy for the anonymous user which will allow the
anonymous user to write to the test node? All the implementations of
AccessControlPolicy are not visible to to my code.

Regards

Ben



2009/11/27 Ben Short &lt;ben@benshort.co.uk&gt;

&gt; Hi,
&gt;
&gt; I'm trying to use the AccessControlManager to allow a user to have write
&gt; permissions to a node. But I can't see how to create  a policy.
&gt;
&gt; Can anyone give me any pointers?
&gt;
&gt; Regards
&gt;
&gt; Ben Short
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Model data problem</title>
<author><name>mitziuro &lt;mitziuro@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c2bc800bc0912040256u2b99f1e9n224469eec275cb4b@mail.gmail.com%3e"/>
<id>urn:uuid:%3c2bc800bc0912040256u2b99f1e9n224469eec275cb4b@mail-gmail-com%3e</id>
<updated>2009-12-04T10:56:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I don't know how to represent the data in my repository.
Now i have a document node that contains a file as data ( &gt;nt:resource) but
i want to extend the functionality for more files.
How should i represent the structure of nodes so when i want the version 1.x
of the document node i want to see the content of the files at that time.

For example if i create a new node (let's say my:file), and a document
contains one or more nodes of this type.
When i do a checkout, checkin operation (and i modify the content of one or
more my:file nodes) on the document node the version created will contain
references to the old content of the my:file nodes ?
A possibility is to make versions for every my:file node when i'm creating a
new version for the document node (so when i want the version 1.5 of the
document to take version 1.5 of the file) but i'll have problems when i'll
try to delete or add new my:file nodes
Is there another way ?

Thank you,
mitziuro


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recommended way to take deal with JCR-1984</title>
<author><name>Ian Boston &lt;ieb@tfd.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3cDC847E37-3D9D-4C59-AD57-5C22252144AA@tfd.co.uk%3e"/>
<id>urn:uuid:%3cDC847E37-3D9D-4C59-AD57-5C22252144AA@tfd-co-uk%3e</id>
<updated>2009-12-04T09:56:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Felix,
yes thank you,
got the update through which did as you say fix about 4 of the tests  
in Sling (and found the sling jira now).
BTW I think the other problems I am having with {internal}privileges  
not being defined are of my own making, although I did notice the  
launch-pad tests are using 2.0.4-incubator of JCR Base rather than  
2.0.5-SNAPSHOT which is in the code base so upgrading the JR API to  
1.6 in the current trunk wont flow through. (not that it fixes any of  
the remaining tests)
Ian

(ccd dev@sling)

On 3 Dec 2009, at 20:46, Felix Meschberger wrote:

&gt; Hi Ian
&gt;
&gt; In fact I rewrote a Sling integration test just this morning exactly
&gt; doing such property setting for verification purposes (the test used  
&gt; to
&gt; check the rep:principalName property which is not available as such  
&gt; any
&gt; longer).
&gt;
&gt; Regards
&gt; Felix
&gt;
&gt; Ian Boston schrieb:
&gt;&gt; Angela,
&gt;&gt; Fantastic,
&gt;&gt; I misread the patch forgetting that * might be allowed.
&gt;&gt; Thank you.
&gt;&gt; Ian
&gt;&gt;
&gt;&gt; On 3 Dec 2009, at 17:44, Angela Schreiber wrote:
&gt;&gt;
&gt;&gt;&gt; hi ian
&gt;&gt;&gt;
&gt;&gt;&gt; JCR-1984 addressed a problem that protected properties defined
&gt;&gt;&gt; by the user/group node types were exposed by the #getPropertyNames
&gt;&gt;&gt; and #getProperty methods, although they could not be modified
&gt;&gt;&gt; by the corresponding set/remove methods.
&gt;&gt;&gt;
&gt;&gt;&gt; this issue should not affect additional, application specific
&gt;&gt;&gt; properties that were or will be stored with a user/group.
&gt;&gt;&gt; the nodetype still allows for
&gt;&gt;&gt;
&gt;&gt;&gt; - * (UNDEFINED)
&gt;&gt;&gt; - * (UNDEFINED) multiple
&gt;&gt;&gt;
&gt;&gt;&gt; and those props should be exposed by the mentioned methods.
&gt;&gt;&gt; i'm not aware of any change that would have broken this.
&gt;&gt;&gt;
&gt;&gt;&gt; angela
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; Ian Boston wrote:
&gt;&gt;&gt;&gt; Hi,
&gt;&gt;&gt;&gt; IIUC [1], post 1.6 blocks an authorizable node from holding any
&gt;&gt;&gt;&gt; properties, other than those listed in the schema.
&gt;&gt;&gt;&gt; How do I add and retrieve a well defined set of properties for the
&gt;&gt;&gt;&gt; node as was possible in JR15 ?
&gt;&gt;&gt;&gt; We have an application that stores extra group and user metadata on
&gt;&gt;&gt;&gt; the authorizable node and I really don't want to have to rewrite  
&gt;&gt;&gt;&gt; it.
&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt; Ian
&gt;&gt;&gt;&gt; 1 https://issues.apache.org/jira/browse/JCR-1984
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Jackrabbit support (paid or otherwise)</title>
<author><name>Michael Wechner &lt;michael.wechner@wyona.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B18D7E4.6090803@wyona.com%3e"/>
<id>urn:uuid:%3c4B18D7E4-6090803@wyona-com%3e</id>
<updated>2009-12-04T09:35:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Jukka Zitting wrote:
&gt; Hi,
&gt;
&gt; On Thu, Dec 3, 2009 at 11:28 PM, Samuel Cox &lt;crankydillo@gmail.com&gt; wrote:
&gt;   
&gt;&gt; I'm unaware of anything outside of what is published from the Jackrabbit
&gt;&gt; site (this mailing list).  Does anyone else know of anything else?
&gt;&gt;     
&gt;
&gt; If there's interest, we could add a "JCR Support" section to the
&gt; JcrLinks page [1] that Philipp already mentioned. Companies and
&gt; individuals who offer JCR support services could list themselves
&gt; there, so people will have easier time finding them.
&gt;
&gt; [1] http://wiki.apache.org/jackrabbit/JcrLinks
&gt;   

+1

Michael
&gt; BR,
&gt;
&gt; Jukka Zitting
&gt;   



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Jackrabbit support (paid or otherwise)</title>
<author><name>Jukka Zitting &lt;jukka.zitting@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c510143ac0912040129m39305d6fy59d1644bca9565fc@mail.gmail.com%3e"/>
<id>urn:uuid:%3c510143ac0912040129m39305d6fy59d1644bca9565fc@mail-gmail-com%3e</id>
<updated>2009-12-04T09:29:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

On Thu, Dec 3, 2009 at 11:28 PM, Samuel Cox &lt;crankydillo@gmail.com&gt; wrote:
&gt; I'm unaware of anything outside of what is published from the Jackrabbit
&gt; site (this mailing list).  Does anyone else know of anything else?

If there's interest, we could add a "JCR Support" section to the
JcrLinks page [1] that Philipp already mentioned. Companies and
individuals who offer JCR support services could list themselves
there, so people will have easier time finding them.

[1] http://wiki.apache.org/jackrabbit/JcrLinks

BR,

Jukka Zitting


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Jackrabbit support (paid or otherwise)</title>
<author><name>Philipp Bunge &lt;buge@crimson.ch&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c442569030912040122l4622e474off7a07de940c52ea@mail.gmail.com%3e"/>
<id>urn:uuid:%3c442569030912040122l4622e474off7a07de940c52ea@mail-gmail-com%3e</id>
<updated>2009-12-04T09:22:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Samuel

&gt; We're creating a decent-sized dependency on a functioning JSR-170
&gt; implementation (Jackrabbit). Â As such, we're curious about the level of
&gt; support we can get.
&gt;
&gt; I'm unaware of anything outside of what is published from the Jackrabbit
&gt; site (this mailing list). Â Does anyone else know of anything else?

Probably the only commercial provider of a dedicated JSR-170
implementation is Day with their CRX product [1]. CRX is essentially a
repackaged Jackrabbit with additional tools, a (pretty neat) TAR based
PersistenceManager and commercial support. Day actually lead the
JSR-170 and JSR-283 specifiications and a lot (most?) of the
Jackrabbit developers actually work there.

There are some other products that have JCR support, but the level and
quality of implementation is rather mixed, IMHO [2]

Cheers,
Philipp

[1] http://www.day.com/day/en/products/crx.html
[2] http://wiki.apache.org/jackrabbit/JcrLinks#Other_JCR_implementations


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: JCR-SQL2 subtree query</title>
<author><name>Philipp Bunge &lt;buge@crimson.ch&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c442569030912040112g688c44dbgf3214e01e420289c@mail.gmail.com%3e"/>
<id>urn:uuid:%3c442569030912040112g688c44dbgf3214e01e420289c@mail-gmail-com%3e</id>
<updated>2009-12-04T09:12:55Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Wes

&gt; I have a bit of a dilemma. I'm working with Jackrabbit 2.0b3 and
&gt; trying to migrate to JCR2.0. However, since the XPATH query syntax is
&gt; deprecated, I'm investigating how to go about writing queries in
&gt; JCR-SQL2. Unfortunately, I haven't come up with many examples or
&gt; tutorials for the new JCR-SQL2 syntax.

There really aren't many tutorial around as far as I know. I use the
railroad diagrams that Thomas MÃ¼ller created quite a lot as a
reference however: http://www.h2database.com/jcr/grammar.html

&gt; One of the scenarios that I'd like to use frequently is searching a
&gt; subtree, i.e. starting at a particular node and searching all
&gt; descendants for certain property values. This is trivial to accomplish
&gt; in XPATH, but I can't figure out the correct (and efficient) way to do
&gt; it using SQL2. Can any one help me out with an example?

You probably want something as follows:

SELECT * FROM [nt:unstructured]
  WHERE ISDESCENDANTNODE([/the/particular/node])
  AND yourproperty = "foo"


Cheers,
Philipp


</pre>
</div>
</content>
</entry>
<entry>
<title>Jackrabbit support (paid or otherwise)</title>
<author><name>Samuel Cox &lt;crankydillo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B183B8C.9000505@gmail.com%3e"/>
<id>urn:uuid:%3c4B183B8C-9000505@gmail-com%3e</id>
<updated>2009-12-03T22:28:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
We're creating a decent-sized dependency on a functioning JSR-170 
implementation (Jackrabbit).  As such, we're curious about the level of 
support we can get.

I'm unaware of anything outside of what is published from the Jackrabbit 
site (this mailing list).  Does anyone else know of anything else?

Thanks.

-- 
Samuel Cox


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recommended way to take deal with JCR-1984</title>
<author><name>Felix Meschberger &lt;fmeschbe@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B1823AC.8030405@gmail.com%3e"/>
<id>urn:uuid:%3c4B1823AC-8030405@gmail-com%3e</id>
<updated>2009-12-03T20:46:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Ian

In fact I rewrote a Sling integration test just this morning exactly
doing such property setting for verification purposes (the test used to
check the rep:principalName property which is not available as such any
longer).

Regards
Felix

Ian Boston schrieb:
&gt; Angela,
&gt; Fantastic,
&gt; I misread the patch forgetting that * might be allowed.
&gt; Thank you.
&gt; Ian
&gt; 
&gt; On 3 Dec 2009, at 17:44, Angela Schreiber wrote:
&gt; 
&gt;&gt; hi ian
&gt;&gt;
&gt;&gt; JCR-1984 addressed a problem that protected properties defined
&gt;&gt; by the user/group node types were exposed by the #getPropertyNames
&gt;&gt; and #getProperty methods, although they could not be modified
&gt;&gt; by the corresponding set/remove methods.
&gt;&gt;
&gt;&gt; this issue should not affect additional, application specific
&gt;&gt; properties that were or will be stored with a user/group.
&gt;&gt; the nodetype still allows for
&gt;&gt;
&gt;&gt;  - * (UNDEFINED)
&gt;&gt;  - * (UNDEFINED) multiple
&gt;&gt;
&gt;&gt; and those props should be exposed by the mentioned methods.
&gt;&gt; i'm not aware of any change that would have broken this.
&gt;&gt;
&gt;&gt; angela
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Ian Boston wrote:
&gt;&gt;&gt; Hi,
&gt;&gt;&gt; IIUC [1], post 1.6 blocks an authorizable node from holding any
&gt;&gt;&gt; properties, other than those listed in the schema.
&gt;&gt;&gt; How do I add and retrieve a well defined set of properties for the
&gt;&gt;&gt; node as was possible in JR15 ?
&gt;&gt;&gt; We have an application that stores extra group and user metadata on
&gt;&gt;&gt; the authorizable node and I really don't want to have to rewrite it.
&gt;&gt;&gt; Thanks
&gt;&gt;&gt; Ian
&gt;&gt;&gt; 1 https://issues.apache.org/jira/browse/JCR-1984
&gt;&gt;
&gt; 
&gt; 


</pre>
</div>
</content>
</entry>
<entry>
<title>JCR-SQL2 subtree query</title>
<author><name>Weston Bustraan &lt;wbustraan@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c55d5ad380912031223g7d569eafpd75fe470211cbdf5@mail.gmail.com%3e"/>
<id>urn:uuid:%3c55d5ad380912031223g7d569eafpd75fe470211cbdf5@mail-gmail-com%3e</id>
<updated>2009-12-03T20:23:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I have a bit of a dilemma. I'm working with Jackrabbit 2.0b3 and
trying to migrate to JCR2.0. However, since the XPATH query syntax is
deprecated, I'm investigating how to go about writing queries in
JCR-SQL2. Unfortunately, I haven't come up with many examples or
tutorials for the new JCR-SQL2 syntax.

One of the scenarios that I'd like to use frequently is searching a
subtree, i.e. starting at a particular node and searching all
descendants for certain property values. This is trivial to accomplish
in XPATH, but I can't figure out the correct (and efficient) way to do
it using SQL2. Can any one help me out with an example?

- Wes Bustraan


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recommended way to take deal with JCR-1984</title>
<author><name>Ian Boston &lt;ieb@tfd.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c7F8FD9A8-F095-4565-885E-8DC66D758CD3@tfd.co.uk%3e"/>
<id>urn:uuid:%3c7F8FD9A8-F095-4565-885E-8DC66D758CD3@tfd-co-uk%3e</id>
<updated>2009-12-03T17:49:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Angela,
Fantastic,
I misread the patch forgetting that * might be allowed.
Thank you.
Ian

On 3 Dec 2009, at 17:44, Angela Schreiber wrote:

&gt; hi ian
&gt;
&gt; JCR-1984 addressed a problem that protected properties defined
&gt; by the user/group node types were exposed by the #getPropertyNames
&gt; and #getProperty methods, although they could not be modified
&gt; by the corresponding set/remove methods.
&gt;
&gt; this issue should not affect additional, application specific
&gt; properties that were or will be stored with a user/group.
&gt; the nodetype still allows for
&gt;
&gt;  - * (UNDEFINED)
&gt;  - * (UNDEFINED) multiple
&gt;
&gt; and those props should be exposed by the mentioned methods.
&gt; i'm not aware of any change that would have broken this.
&gt;
&gt; angela
&gt;
&gt;
&gt;
&gt; Ian Boston wrote:
&gt;&gt; Hi,
&gt;&gt; IIUC [1], post 1.6 blocks an authorizable node from holding any  
&gt;&gt; properties, other than those listed in the schema.
&gt;&gt; How do I add and retrieve a well defined set of properties for the  
&gt;&gt; node as was possible in JR15 ?
&gt;&gt; We have an application that stores extra group and user metadata on  
&gt;&gt; the authorizable node and I really don't want to have to rewrite it.
&gt;&gt; Thanks
&gt;&gt; Ian
&gt;&gt; 1 https://issues.apache.org/jira/browse/JCR-1984
&gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Recommended way to take deal with JCR-1984</title>
<author><name>Angela Schreiber &lt;anchela@day.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B17F912.809@day.com%3e"/>
<id>urn:uuid:%3c4B17F912-809@day-com%3e</id>
<updated>2009-12-03T17:44:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
hi ian

JCR-1984 addressed a problem that protected properties defined
by the user/group node types were exposed by the #getPropertyNames
and #getProperty methods, although they could not be modified
by the corresponding set/remove methods.

this issue should not affect additional, application specific
properties that were or will be stored with a user/group.
the nodetype still allows for

   - * (UNDEFINED)
   - * (UNDEFINED) multiple

and those props should be exposed by the mentioned methods.
i'm not aware of any change that would have broken this.

angela



Ian Boston wrote:
&gt; Hi,
&gt; 
&gt; IIUC [1], post 1.6 blocks an authorizable node from holding any 
&gt; properties, other than those listed in the schema.
&gt; How do I add and retrieve a well defined set of properties for the node 
&gt; as was possible in JR15 ?
&gt; 
&gt; We have an application that stores extra group and user metadata on the 
&gt; authorizable node and I really don't want to have to rewrite it.
&gt; 
&gt; Thanks
&gt; Ian
&gt; 
&gt; 
&gt; 1 https://issues.apache.org/jira/browse/JCR-1984
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Recommended way to take deal with JCR-1984</title>
<author><name>Ian Boston &lt;ieb@tfd.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c1BD29549-07A4-4B17-B63B-FAC6B597EEAB@tfd.co.uk%3e"/>
<id>urn:uuid:%3c1BD29549-07A4-4B17-B63B-FAC6B597EEAB@tfd-co-uk%3e</id>
<updated>2009-12-03T17:01:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

IIUC [1], post 1.6 blocks an authorizable node from holding any  
properties, other than those listed in the schema.

How do I add and retrieve a well defined set of properties for the  
node as was possible in JR15 ?

We have an application that stores extra group and user metadata on  
the authorizable node and I really don't want to have to rewrite it.

Thanks
Ian


1 https://issues.apache.org/jira/browse/JCR-1984


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Jackrabbit on Equinox (OSGi)</title>
<author><name>Felix Meschberger &lt;fmeschbe@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B17DCDD.4070408@gmail.com%3e"/>
<id>urn:uuid:%3c4B17DCDD-4070408@gmail-com%3e</id>
<updated>2009-12-03T15:44:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Samuel

Have you looked at my current experiments I am doing upgrading the Sling
embedded Repository to Jackrabbit 2 in [1]. See also SLING-1212 [2]

[1]
http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jackrabbit2upgrade
[2] https://issues.apache.org/jira/browse/SLING-1212

Regards
Felix

Samuel Cox schrieb:
&gt; Does anyone have any experience with Jackrabbit and Equinox?
&gt; 
&gt; I have read the guide at
&gt; http://cwiki.apache.org/SLING/launching-a-jcr-repository-inside-equinox.html.
&gt; 
&gt; 
&gt; We currently build OSGi bundles from Jackrabbit 1.5.5 source and deploy
&gt; them into the Felix OSGi container.  All has been going well for months.
&gt;  However, we are soon going to migrate to Jackrabbit 1.6 in order to
&gt; pick up the RepositoryCopier tool AND to the Equinox OSGi container.
&gt; 
&gt; Many thanks.
&gt; 


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Jackrabbit on Equinox (OSGi)</title>
<author><name>Guo Du &lt;mrduguo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3ce2a35cbc0912030734w2192d99av6aaee67e278cb829@mail.gmail.com%3e"/>
<id>urn:uuid:%3ce2a35cbc0912030734w2192d99av6aaee67e278cb829@mail-gmail-com%3e</id>
<updated>2009-12-03T15:34:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Thu, Dec 3, 2009 at 3:08 PM, Samuel Cox &lt;crankydillo@gmail.com&gt; wrote:
&gt; Does anyone have any experience with Jackrabbit and Equinox?
I have no problem to run jackrabbit 2.0-alpha12 on Equinox 3.5.100

-Guo


</pre>
</div>
</content>
</entry>
<entry>
<title>Jackrabbit on Equinox (OSGi)</title>
<author><name>Samuel Cox &lt;crankydillo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B17D464.3070700@gmail.com%3e"/>
<id>urn:uuid:%3c4B17D464-3070700@gmail-com%3e</id>
<updated>2009-12-03T15:08:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Does anyone have any experience with Jackrabbit and Equinox?

I have read the guide at 
http://cwiki.apache.org/SLING/launching-a-jcr-repository-inside-equinox.html.

We currently build OSGi bundles from Jackrabbit 1.5.5 source and deploy 
them into the Felix OSGi container.  All has been going well for months. 
  However, we are soon going to migrate to Jackrabbit 1.6 in order to 
pick up the RepositoryCopier tool AND to the Equinox OSGi container.

Many thanks.

-- 
Samuel Cox


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Datastore problem</title>
<author><name>Alexander Klimetschek &lt;aklimets@day.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3cc3ac3bad0912030331q2eca9cb5mcfcfe4627eed7d4b@mail.gmail.com%3e"/>
<id>urn:uuid:%3cc3ac3bad0912030331q2eca9cb5mcfcfe4627eed7d4b@mail-gmail-com%3e</id>
<updated>2009-12-03T11:31:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Thu, Dec 3, 2009 at 11:53, Sunil Dhage &lt;sunil.dhage@coreobjects.com&gt; wrote:
&gt; I have a problem regarding large binary files, which need to be versioned.
&gt;
&gt; Because the nodes which hold the above said binary files, they were getting stored both
at workspace and versions.
&gt;
&gt; After reading enough documentation, I could understand like i am missing datastore in
my repository.xml, which will be used to
&gt; store files exceeding "minRecordLength" size and only references will be stored at workspace
and versionspace.
&gt;
&gt; Then I have added datastore to my repository.xml.  Please find the repository.xml attached.
&gt;
&gt; But the problem is now all of my binary files i.e. photos,documents are getting stored
at all the three locations.
&gt; 1. Datastore
&gt; 2. Workspaces,
&gt; 3. Versions.

&gt;From looking at the repository.xml you provided, I see that you are
using the xml persistence manager (for both workspaces and the
versions). AFAIK it doesn't cope with the datastore at all. It is very
old and only for debugging purposes, because it is not safe.

I strongly recommend you switch to a bundle persistence manager, eg.
the DerbyPersistenceManager or the H2PersistenceManager which are both
embedded and thus don't require any additional db setup or
configuration.

See http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ

Note that you will have to set up the repository from scratch. If you
just remove the xml pm files, but keep the workspace directories incl.
the workspace.xml files, you will have to change the persistence
manager config in those too.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com


</pre>
</div>
</content>
</entry>
<entry>
<title>Datastore problem</title>
<author><name>Sunil Dhage &lt;sunil.dhage@coreobjects.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c33A0EEB8D50198449794A1AB9DEB1E01D3633D556E@copuex01.coreobjects.com%3e"/>
<id>urn:uuid:%3c33A0EEB8D50198449794A1AB9DEB1E01D3633D556E@copuex01-coreobjects-com%3e</id>
<updated>2009-12-03T10:53:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I have a problem regarding large binary files, which need to be versioned.

Because the nodes which hold the above said binary files, they were getting stored both at
workspace and versions.

After reading enough documentation, I could understand like i am missing datastore in my repository.xml,
which will be used to 
store files exceeding "minRecordLength" size and only references will be stored at workspace
and versionspace.

Then I have added datastore to my repository.xml.  Please find the repository.xml attached.

But the problem is now all of my binary files i.e. photos,documents are getting stored at
all the three locations.
1. Datastore
2. Workspaces,
3. Versions.
Please find the screen shot depicting the above scenario

Can you please let me know how to make only references get stored in workspaces and versions.
I am sure there might be some parameter which will govern when to store the content and when
to store the reference of the file, which got stored at datastore.

Awaiting your response.

/Sunil Dhage

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: looking for versioning and branching documentation or tests</title>
<author><name>Robin Batra &lt;robin.batra@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c36ecc5b10912030121u2a46c0e9yf9dc3aad4e5a7725@mail.gmail.com%3e"/>
<id>urn:uuid:%3c36ecc5b10912030121u2a46c0e9yf9dc3aad4e5a7725@mail-gmail-com%3e</id>
<updated>2009-12-03T09:21:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Toby,

I am trying to implement the merging thing and since you have mentioned that
if a V1.3 and V1.2.1 are merged it would result in V1.4, is it right to
assume here that the node.merge() is called on V1.3 and not on 1.2.1. Also
am i right in saying that if i try to call a merge() on V1.3 i would be
getting a conflict?

I tried the same thing at my end. When i try to merge V1.3 and V1.2.1 (using
the names as per your example) i get a conflicting result. The Node Iterator
returned by merge() function contains the Node of V1.3 and has the
jcr:mergeFailed property set to V1.2.1's UUID.

I call node.doneMerge(V1.2.1) after that to mark the two versions as merged.
At this point if i check the jcr:mergeFailed property, i get a "Path does
not exist" Exception (due to which i assume that the property has been
cleared and the Nodes have been marked as merged) but when i call the
merge() on V1.3' Node i again get a Conflicting result.

Am i missing something?? If you could provide any input it would be great

On Thu, Dec 3, 2009 at 3:54 AM, Tobias Bocanegra &lt;tripod@day.com&gt; wrote:

&gt; Hi,
&gt; a branch is created when you perform a checkin on a node that has a
&gt; base version which has successors.
&gt; for example, if you have:
&gt;
&gt; v1.0 -&gt; v1.1 -&gt; v1.2 -&gt; v1.3
&gt;
&gt; and you restore the node to v1.2 (i.e. set it's base version to 1.2),
&gt; and then checkout, checkin, a new version v1.2.1 is created, which has
&gt; v1.2 as predecessor and v1.2 has v1.3 and v1.2.1 as successor.
&gt;
&gt; although you can create branches without having a 2nd workspace, for
&gt; merging you need one.
&gt; so you need to have a corresponding versionable node in the 2nd
&gt; workspace where you can merge against.
&gt; but there is no application logic behind the merging, e.g. like in svn
&gt; where the text files are "merged". so no content is actually merged,
&gt; but only the 2 version branches are brought together again.
&gt;
&gt; in the above example, if node in ws1 has base version v1.3 and its
&gt; corresponding node in ws2 has base version v.1.2.1 and you merge them,
&gt; you'll get v1.4 that hase v1.3 and v1.2.1 as predecessors.
&gt;
&gt; hope this helps.
&gt; regards, toby
&gt;
&gt;
&gt; On Wed, Dec 2, 2009 at 5:48 PM, Luiz Fernando Teston
&gt; &lt;feu.teston@caravelatech.com&gt; wrote:
&gt; &gt; I saw that node.checkin() just can be called once to create a new
&gt; version.
&gt; &gt; Is it possible to create new parallel versions based on the same node?
&gt; And
&gt; &gt; after doing some work on this different versions, is it possible to merge
&gt; &gt; two or more different versions to create a new merged version?
&gt; &gt;
&gt; &gt; The spec and other Jcr and Jackrabbit documentation doesn't show a
&gt; merging
&gt; &gt; scenario, but it have some methods on javadoc which talks about merging.
&gt; But
&gt; &gt; on the other side, the way I found to create new versions (checkin and
&gt; &gt; checkout on node) only permit to create version nodes on a linear way.
&gt; &gt;
&gt; &gt; Regards,
&gt; &gt;
&gt; &gt;
&gt; &gt; Fernando Teston
&gt; &gt;
&gt; &gt; On Tue, Dec 1, 2009 at 3:07 PM, Luiz Fernando Teston &lt;
&gt; &gt; feu.teston@caravelatech.com&gt; wrote:
&gt; &gt;
&gt; &gt;&gt; Fellows,
&gt; &gt;&gt;
&gt; &gt;&gt; Is there any documentation, website or test showing few examples about
&gt; &gt;&gt; versioning? I'm already using versioning on some parts of the software
&gt; I'm
&gt; &gt;&gt; working on, but now I need to do some branching behavior, and I didn't
&gt; find
&gt; &gt;&gt; any good material showing this.
&gt; &gt;&gt;
&gt; &gt;&gt; Best regards,
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt; Fernando Teston
&gt; &gt;&gt;
&gt; &gt;
&gt;



-- 
Regards

Robin Batra


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Repository setup</title>
<author><name>=?ISO-8859-1?Q?S=E9bastien_Launay?= &lt;sebastienlaunay@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4d6717570912030108i5f77796dp645cc04f388c34f7@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4d6717570912030108i5f77796dp645cc04f388c34f7@mail-gmail-com%3e</id>
<updated>2009-12-03T09:08:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I am also having this issue.

A temporary workaround is to remove the jackrabbit directory found in
the working directory where you start your servlet engine (like TOMCAT_HOME
or JETTY_HOME).

I just filled a bug on JIRA for this problem [1].

[1] https://issues.apache.org/jira/browse/JCR-2421

-- 
Sébastien Launay

2009/12/3 anand &lt;simer.anand88@gmail.com&gt;:
&gt;
&gt; Hello Users,
&gt;
&gt; I was trying using jackrabbit-webapp-2.0.beta3 but after i started the
&gt; server i move to Content Repository Setup at
&gt; http://localhost:8080/jackrabbit-webapp-2.0-beta3/ and there i got two
&gt; options either use existing on or create a new repository. I opted for new
&gt; one. And the moment i click the "Create Content Repository" then it shows
&gt; NEXT PAGE THAT IS Content Repository Exists.
&gt;
&gt; What could be problem?
&gt;
&gt; Thanks,
&gt; simer


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Searching for a property</title>
<author><name>Ard Schrijvers &lt;a.schrijvers@onehippo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c697f8380912030104wb5e2d51xd8708b7c2de4a15@mail.gmail.com%3e"/>
<id>urn:uuid:%3c697f8380912030104wb5e2d51xd8708b7c2de4a15@mail-gmail-com%3e</id>
<updated>2009-12-03T09:04:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Dennis,

it's because your using 2 times a child axis query (jcr:root and one
within the where clause) that makes it slow and. Explaining why is out
of scope for the user list, but I wrote quite some time ago a few
guidelines (most of them still valid):

http://n4.nabble.com/Explanation-and-solutions-of-some-Jackrabbit-queries-regarding-performance-td516614.html#a516614

I am not sure what nodetype jcr:content is, but suppose: my:contenttype

now, if your query would be:

//element(*,my:contenttype)[fn:lower-case(@cms:virtualPath)= '" + vpath + "']";

the query will be instant. Just take the parent node of the result and
you should be fine. Just wondering, are you building a brand new cms
on jcr? I am not sure what the @cms:virtualPath holds, but if you also
need virtual environments showing the same jcr nodes in different tree
structures you might wanna take a look here [1].

Regards Ard

[1] http://www.onehippo.org/cms7


On Thu, Dec 3, 2009 at 9:47 AM, Dennis van der Laan
&lt;d.g.van.der.laan@rug.nl&gt; wrote:
&gt; Hi,
&gt;
&gt; It seems querying on a property is very slow on our system (running
&gt; Jackrabbit 1.6.0): almost 1 second per query which would normally return
&gt; 0 or 1 result.
&gt;
&gt; We use jcr:content nodes of type nt:unstructured to store the contents
&gt; of a file (in the jcr:data property) and we store an array of Strings in
&gt; a property cms:virtualPath on the same node. So basically, every file in
&gt; our repository has the JCR path and zero or more virtual paths in the
&gt; cms:virtualPath property. If we want to add a virtual path to a file, we
&gt; have to check if the virtual path does not exist already. For this, we
&gt; use an XPath query in the following code snippet:
&gt;
&gt; String vpath = QueryUtil.escapeForAttributeSearch(path.toLowerCase());
&gt; String query =
&gt; "/jcr:root//element(*,nt:hierarchyNode)[fn:lower-case(jcr:content/@cms:virtualPath)
&gt; = '" + vpath + "']";
&gt; Query q = queryManager.createQuery(query, Query.XPATH);
&gt; NodeIterator ni = q.execute().getNodes();
&gt; if (ni.getSize() == 0) {
&gt;    throw new ItemNotFoundException("Unable to find item by virtual
&gt; path: " + path);
&gt; }
&gt; else if (ni.getSize() &gt; 1) {
&gt;    throw new IllegalStateException("More than 1 item on virtual path: "
&gt; + path);
&gt; }
&gt; else {
&gt;    return ni.nextNode();
&gt; }
&gt;
&gt; Our repository now contains around 500,000 virtual paths, more or less
&gt; divided over 150,000 files which are evenly distributed over more than
&gt; 1000 (nested) folders.
&gt;
&gt; The repository runs on an Intel Nehalem Xeon (2 x 2.5GHz) running
&gt; Solaris 10 and the repository database (for datastore, filesystem, etc)
&gt; runs on the same specs, on a different server, running Oracle 10g.
&gt;
&gt; When we try to add virtual paths in a batch (about 2000 virtual path
&gt; properties for 1000 files) and all virtual paths already exist (so the
&gt; above query returns 1 virtual path), we see a 100% load of the our
&gt; Tomcat application (which means 1 core fully utilized).
&gt;
&gt; I would expect a JCR repository to be able to handle this kind of
&gt; queries. How are these properties indexed? Is it possible to optimize
&gt; the repository for this kind of queries? Or should I use a different
&gt; query? The alternative would be to keep a different database which keeps
&gt; track of the virtual paths, but keeping that in sync with the JCR
&gt; repository would be a pain, at the least.
&gt;
&gt; Thanks for your ideas about this issue,
&gt; Kind regards,
&gt; Dennis van der Laan
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Searching for a property</title>
<author><name>Dennis van der Laan &lt;d.g.van.der.laan@rug.nl&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c4B177B0F.8040303@rug.nl%3e"/>
<id>urn:uuid:%3c4B177B0F-8040303@rug-nl%3e</id>
<updated>2009-12-03T08:47:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

It seems querying on a property is very slow on our system (running
Jackrabbit 1.6.0): almost 1 second per query which would normally return
0 or 1 result.

We use jcr:content nodes of type nt:unstructured to store the contents
of a file (in the jcr:data property) and we store an array of Strings in
a property cms:virtualPath on the same node. So basically, every file in
our repository has the JCR path and zero or more virtual paths in the
cms:virtualPath property. If we want to add a virtual path to a file, we
have to check if the virtual path does not exist already. For this, we
use an XPath query in the following code snippet:

String vpath = QueryUtil.escapeForAttributeSearch(path.toLowerCase());
String query =
"/jcr:root//element(*,nt:hierarchyNode)[fn:lower-case(jcr:content/@cms:virtualPath)
= '" + vpath + "']";
Query q = queryManager.createQuery(query, Query.XPATH);
NodeIterator ni = q.execute().getNodes();
if (ni.getSize() == 0) {
    throw new ItemNotFoundException("Unable to find item by virtual
path: " + path);
}
else if (ni.getSize() &gt; 1) {
    throw new IllegalStateException("More than 1 item on virtual path: "
+ path);
}
else {
    return ni.nextNode();
}

Our repository now contains around 500,000 virtual paths, more or less
divided over 150,000 files which are evenly distributed over more than
1000 (nested) folders.

The repository runs on an Intel Nehalem Xeon (2 x 2.5GHz) running
Solaris 10 and the repository database (for datastore, filesystem, etc)
runs on the same specs, on a different server, running Oracle 10g.

When we try to add virtual paths in a batch (about 2000 virtual path
properties for 1000 files) and all virtual paths already exist (so the
above query returns 1 virtual path), we see a 100% load of the our
Tomcat application (which means 1 core fully utilized).

I would expect a JCR repository to be able to handle this kind of
queries. How are these properties indexed? Is it possible to optimize
the repository for this kind of queries? Or should I use a different
query? The alternative would be to keep a different database which keeps
track of the virtual paths, but keeping that in sync with the JCR
repository would be a pain, at the least.

Thanks for your ideas about this issue,
Kind regards,
Dennis van der Laan


</pre>
</div>
</content>
</entry>
<entry>
<title>xpath function for namespace-uri?</title>
<author><name>Omid Milani &lt;omilani@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3ca250e2ec0912030023s3174f8fdsab44b6c43a0e5bd7@mail.gmail.com%3e"/>
<id>urn:uuid:%3ca250e2ec0912030023s3174f8fdsab44b6c43a0e5bd7@mail-gmail-com%3e</id>
<updated>2009-12-03T08:23:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
hi,

I'm trying to query (xpath) nodes of a specific namespace uri, but it
seems namespace-uri() and namespace-prefix() are not supported.
wlidcarding the local name part ( //prefix:* ) doesn't work either.
so, how can I do this?

also i notices an strange behavior. executing a query like this
doesn't throw exception, just no result:
//*[wrong-function-name() = 'nothing']
but executing this one results in InvalidQueryException:
//*[wrong-function-name()]
imo using mistaken function name should always result in exception.


</pre>
</div>
</content>
</entry>
<entry>
<title>Repository setup</title>
<author><name>anand &lt;simer.anand88@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c1259821573227-947389.post@n4.nabble.com%3e"/>
<id>urn:uuid:%3c1259821573227-947389-post@n4-nabble-com%3e</id>
<updated>2009-12-03T06:26:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hello Users,

I was trying using jackrabbit-webapp-2.0.beta3 but after i started the
server i move to Content Repository Setup at
http://localhost:8080/jackrabbit-webapp-2.0-beta3/ and there i got two
options either use existing on or create a new repository. I opted for new
one. And the moment i click the "Create Content Repository" then it shows
NEXT PAGE THAT IS Content Repository Exists.

What could be problem?

Thanks,
simer
-- 
View this message in context: http://n4.nabble.com/Repository-setup-tp947389p947389.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: looking for versioning and branching documentation or tests</title>
<author><name>Tobias Bocanegra &lt;tripod@day.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3cffd6aaa90912021424w2208b037lc710cb0dd2f39cfc@mail.gmail.com%3e"/>
<id>urn:uuid:%3cffd6aaa90912021424w2208b037lc710cb0dd2f39cfc@mail-gmail-com%3e</id>
<updated>2009-12-02T22:24:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
a branch is created when you perform a checkin on a node that has a
base version which has successors.
for example, if you have:

v1.0 -&gt; v1.1 -&gt; v1.2 -&gt; v1.3

and you restore the node to v1.2 (i.e. set it's base version to 1.2),
and then checkout, checkin, a new version v1.2.1 is created, which has
v1.2 as predecessor and v1.2 has v1.3 and v1.2.1 as successor.

although you can create branches without having a 2nd workspace, for
merging you need one.
so you need to have a corresponding versionable node in the 2nd
workspace where you can merge against.
but there is no application logic behind the merging, e.g. like in svn
where the text files are "merged". so no content is actually merged,
but only the 2 version branches are brought together again.

in the above example, if node in ws1 has base version v1.3 and its
corresponding node in ws2 has base version v.1.2.1 and you merge them,
you'll get v1.4 that hase v1.3 and v1.2.1 as predecessors.

hope this helps.
regards, toby


On Wed, Dec 2, 2009 at 5:48 PM, Luiz Fernando Teston
&lt;feu.teston@caravelatech.com&gt; wrote:
&gt; I saw that node.checkin() just can be called once to create a new version.
&gt; Is it possible to create new parallel versions based on the same node? And
&gt; after doing some work on this different versions, is it possible to merge
&gt; two or more different versions to create a new merged version?
&gt;
&gt; The spec and other Jcr and Jackrabbit documentation doesn't show a merging
&gt; scenario, but it have some methods on javadoc which talks about merging. But
&gt; on the other side, the way I found to create new versions (checkin and
&gt; checkout on node) only permit to create version nodes on a linear way.
&gt;
&gt; Regards,
&gt;
&gt;
&gt; Fernando Teston
&gt;
&gt; On Tue, Dec 1, 2009 at 3:07 PM, Luiz Fernando Teston &lt;
&gt; feu.teston@caravelatech.com&gt; wrote:
&gt;
&gt;&gt; Fellows,
&gt;&gt;
&gt;&gt; Is there any documentation, website or test showing few examples about
&gt;&gt; versioning? I'm already using versioning on some parts of the software I'm
&gt;&gt; working on, but now I need to do some branching behavior, and I didn't find
&gt;&gt; any good material showing this.
&gt;&gt;
&gt;&gt; Best regards,
&gt;&gt;
&gt;&gt;
&gt;&gt; Fernando Teston
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: looking for versioning and branching documentation or tests</title>
<author><name>Luiz Fernando Teston &lt;feu.teston@caravelatech.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3cc34d2a310912020848l3b0d3c11u3d77238bfb29c863@mail.gmail.com%3e"/>
<id>urn:uuid:%3cc34d2a310912020848l3b0d3c11u3d77238bfb29c863@mail-gmail-com%3e</id>
<updated>2009-12-02T16:48:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I saw that node.checkin() just can be called once to create a new version.
Is it possible to create new parallel versions based on the same node? And
after doing some work on this different versions, is it possible to merge
two or more different versions to create a new merged version?

The spec and other Jcr and Jackrabbit documentation doesn't show a merging
scenario, but it have some methods on javadoc which talks about merging. But
on the other side, the way I found to create new versions (checkin and
checkout on node) only permit to create version nodes on a linear way.

Regards,


Fernando Teston

On Tue, Dec 1, 2009 at 3:07 PM, Luiz Fernando Teston &lt;
feu.teston@caravelatech.com&gt; wrote:

&gt; Fellows,
&gt;
&gt; Is there any documentation, website or test showing few examples about
&gt; versioning? I'm already using versioning on some parts of the software I'm
&gt; working on, but now I need to do some branching behavior, and I didn't find
&gt; any good material showing this.
&gt;
&gt; Best regards,
&gt;
&gt;
&gt; Fernando Teston
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: State of JCR-SQL2</title>
<author><name>Philipp Bunge &lt;buge@crimson.ch&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/jackrabbit-users/200912.mbox/%3c442569030912020535h4c63ad68wb68cf04fd4476d50@mail.gmail.com%3e"/>
<id>urn:uuid:%3c442569030912020535h4c63ad68wb68cf04fd4476d50@mail-gmail-com%3e</id>
<updated>2009-12-02T13:35:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Thomas!

Thanks for the quick reply!

&gt;&gt; state of the JCR-SQL2 implementation in Jackrabbit
&gt;
&gt; Some features that are available in XPath are not yet available when
&gt; using SQL-2. I don't know exactly what those feature are however.

And testing of QOM/SQL2 before a Jackrabbit 2.0 final release? It
appeared to me that the only JCR-SQL2 tests are currently parsing
tests but they only test if the queries are parsed without an
exception (the QOM tree they produce is not verified for example).
Also, are there any tests that execute QOM or SQL2 queries? I couldn't
find any, that's why I created a new test case in the last bug I
reported (JCR-2417).

Thanks again for all your work! I really appreciate it.

Cheers,
Philipp


</pre>
</div>
</content>
</entry>
</feed>
