Christian Stocker | 1 Jun 2011 09:27
Picon
Favicon

Getting multiple nodes in one call with davex?

Hi

We often have to need to load completely different nodes in the same
"request", with different structures and maybe even different nodetypes.
Currently, we have to get this all with many eg. Session.getNode(path)
requests. As we use davex to speak to Jackrabbit, this adds considerable
overhead, since we have to do a http request for each node.

What would be great now is if we could get all those nodes in one http
call. something like Session.getNodes(string[] path). I know it's not in
the specs, but is there a way to do something like that in the lower
levels of davex/http-remoting? If not, how hard would it be to implement
that and how should we do that?

And: Would Session.getNodes() be a good addition to the specs? Could be
useful for others as well.

chregu

--

-- 
Liip AG  //  Feldstrasse 133 //  CH-8004 Zurich
Tel +41 43 500 39 81 // Mobile +41 76 561 88 60
www.liip.ch // blog.liip.ch // GnuPG 0x0748D5FE

Angela Schreiber | 1 Jun 2011 10:19
Picon
Favicon

Re: Getting multiple nodes in one call with davex?

hi christian

currently RepositoryService#getItemInfos(SessionInfo, NodeId) is
defined as follows:

"Method used to 'batch-read' from the persistent storage. It returns the
  NodeInfo for the given NodeId as the first element in the
  Iterator. In addition the iterator may contain arbitrary
  ItemInfos."

in other words: the SPI implementation is free to return any additional
iteminfos (even if not explicitly requested) and the 'client' (e.g. 
jcr2spi) is in charge of properly dealing with the information
returned... however, it's currently not possible for the 'client' to
pass multiple nodeIDs to the getItemInfo method.

the main reason for not having this in the SPI interface is - as you 
already stated - that there is not corresponding JCR API call for this.

> We often have to need to load completely different nodes in the same
> "request", with different structures and maybe even different nodetypes.
> Currently, we have to get this all with many eg. Session.getNode(path)
> requests. As we use davex to speak to Jackrabbit, this adds considerable
> overhead, since we have to do a http request for each node.
>
> What would be great now is if we could get all those nodes in one http
> call. something like Session.getNodes(string[] path). I know it's not in
> the specs, but is there a way to do something like that in the lower
> levels of davex/http-remoting? If not, how hard would it be to implement
> that and how should we do that?
(Continue reading)

husbas | 1 Jun 2011 14:33
Picon

Re: Using rescrictions in Principal based ACL

Thanks. This helped a lot.

Another one.
I created a user using UserManager and have a blank ACL in the repository.
That is there are no ACE for the uesr. However, the user still has complete
access to the repository. Is that the default policy? How can I change that?
I am using Principal based ACLProvider. 

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Using-rescrictions-in-Principal-based-ACL-tp3562758p3565701.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Edouard Hue | 1 Jun 2011 14:35
Picon

Strange behavior with JCA adapter

Hello all,

I'm trying to deploy Jackrabbit 2.3-SNAPSHOT into a Jonas 5.1 application
server as a JCA resource. The RAR deploys OK and shows up in JNDI. Then I
try to access the repository through RMI, using Jonas' Carol RMI
implementation, with the code below :

final JndiRepositoryFactory factory = new JndiRepositoryFactory();
final Map<String, String> parameters = new HashMap<String, String>() {{
    put(JndiRepositoryFactory.JNDI_NAME, "rbus");
    put(Context.INITIAL_CONTEXT_FACTORY,
"org.ow2.carol.jndi.spi.IRMIContextWrapperFactory");
    put(Context.PROVIDER_URL, "rmi://bo-app-01.ipop.proj.aql.fr:1091");
}};
repo = factory.getRepository(parameters);

I run this code on a client machine running Windows. Jonas is running on a
remote Linux machine. The logs show the two lines below :

1 juin 2011 11:24:05 org.slf4j.impl.JCLLoggerAdapter info
INFO: Creating repository directory \var\opt\data\flat\rbus\jcr
1 juin 2011 11:24:05 org.slf4j.impl.JCLLoggerAdapter info
INFO: Copying configuration from
jar:file:/I:/Maven/org/apache/jackrabbit/jackrabbit-core/2.3-SNAPSHOT/jackrabbit-core-2.3-SNAPSHOT.jar!/org/apache/jackrabbit/core/repository.xml
to \opt\application\rbus\current\etc\repository.xml

The two pathes \var\opt\data\flat\rbus\jcr
and \opt\application\rbus\current\etc\repository.xml are defined in the RAR
deployment descriptor. I expected the repository to be created and accessed
remotely on the server, but it appears that it is created locally on the
(Continue reading)

David Buchmann | 1 Jun 2011 14:41
Picon
Favicon
Gravatar

Re: Getting multiple nodes in one call with davex?


i stumbled over this issue, which is related to the topic:
https://issues.apache.org/jira/browse/JCR-2549

cheers,david

Am 01.06.2011 09:27, schrieb Christian Stocker:
> Hi
> 
> We often have to need to load completely different nodes in the same
> "request", with different structures and maybe even different nodetypes.
> Currently, we have to get this all with many eg. Session.getNode(path)
> requests. As we use davex to speak to Jackrabbit, this adds considerable
> overhead, since we have to do a http request for each node.
> 
> What would be great now is if we could get all those nodes in one http
> call. something like Session.getNodes(string[] path). I know it's not in
> the specs, but is there a way to do something like that in the lower
> levels of davex/http-remoting? If not, how hard would it be to implement
> that and how should we do that?
> 
> And: Would Session.getNodes() be a good addition to the specs? Could be
> useful for others as well.
> 
> chregu
> 

--

-- 
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
(Continue reading)

husbas | 1 Jun 2011 15:26
Picon

Re: Using rescrictions in Principal based ACL

I have one more doubt with Principal based ACL Providers
I created a user using UserManager and have a blank ACL in the repository.
That is there are no ACE for the uesr. However, the user still has complete
access to the repository. Is that the default policy? How can I change that?
I am using Principal based ACLProvider.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Using-rescrictions-in-Principal-based-ACL-tp3562758p3565825.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

husbas | 1 Jun 2011 15:39
Picon

Getting the shared node path in search results

Hi,

I have a scenario for shared nodes.
I have two users, foo and bar with their respective home folders /home/foo
and /home/bar similar to what we have in a typical unix env.

I have a document /home/foo/work/task1/sample.doc. However, I have a
requirement where I need to provider bar access to task1 (but not to the
home folder work) such that he's only able to access sample.doc and other
siblings of it.

Hence, I created a shared node /home/bar/work/task1 where task1 is shared
node. Now when I do a full text search, the result is always
/home/foo/work/task1/sample.doc and the shared node path doesn't seem to be
included.  

So,  bar is unable to access sample.doc as it doesn't have access to
/home/foo/work. Is there any work around for this?

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Getting-the-shared-node-path-in-search-results-tp3565856p3565856.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Angela Schreiber | 1 Jun 2011 16:49
Picon
Favicon

Re: Using rescrictions in Principal based ACL

hi husain

> Another one.
> I created a user using UserManager and have a blank ACL in the repository.

the acls reside in a workspace an not the whole repository...
not sure what you mean.

> That is there are no ACE for the uesr. However, the user still has complete
> access to the repository. Is that the default policy? How can I change that?
> I am using Principal based ACLProvider.

what are the permissions granted to the everyone group?
if i remember correctly the default setup grants jcr:read privilege to
everyone. this can be turned off by setting the omit-default-permission
parameter in the ac-provider configuration. (if the ace has already
been created before you need to remove it using the API).

is this what you are looking for?
angela

husbas | 1 Jun 2011 18:34
Picon

Re: Using rescrictions in Principal based ACL

>the acls reside in a workspace an not the whole repository...
>not sure what you mean.
I was not clear enough.
Basically I created a user and created an ACE entry for it with jcr:read for
path "/". This worked fine and the user got read access to the full
workspace. Then I removed all the ACE entries for this user. So the policy
rep:accesscontrol/rep:security...../t/to/tom/rep:policy (I don't have the
exact node path right now) exists but there are no ACEs within, its a policy
node with no entries.
Does this mean that the user still has the jcr:read or some set of default
permissions?

-Husain

On Wed, Jun 1, 2011 at 6:50 PM, Angela Schreiber-2 [via Jackrabbit] <
ml-node+3566044-1013664766-241589 <at> n4.nabble.com> wrote:

> hi husain
>
> > Another one.
> > I created a user using UserManager and have a blank ACL in the
> repository.
>
> the acls reside in a workspace an not the whole repository...
> not sure what you mean.
>
> > That is there are no ACE for the uesr. However, the user still has
> complete
> > access to the repository. Is that the default policy? How can I change
> that?
(Continue reading)

mmjose26 | 1 Jun 2011 19:06
Picon
Favicon

Re: Getting multiple nodes in one call with davex?

I had the same problem, because davex do a request for each
Session.getNode(path). but if you have some common property in nodes or in
paths, you could try with a SQL2Query and query only for properties that you
need at first time (avoid binary content for best performance), and in
second time get all detail of only one node of interest.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Getting-multiple-nodes-in-one-call-with-davex-tp3565136p3566361.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Gmane