jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Esnault <f...@legisway.com>
Subject RE: getNode without the name
Date Wed, 27 Jun 2007 06:17:49 GMT

Hi Jukka, and thanks for your answer !

In fact I cannot use the UUID.

The thing is I'm writing JMeter tests and for a "Get Node Test Plan", I'm generating random
position, and I want to get the contract (or whatever) node at the position defined by this
random number.

Something like : /lgw:root/lgw:contracts/child::*[__Random(1, max_contracts, position)]

As the name of the contract node is not known (generated with the node uuid), and as the nodes
are generated (I made a random data generator), I cannot "hard code" uuids in my JMeter test

Your idea was good, anyway ;) And to be honest with you, I decided (to test the getNodeByUUID()
method), to make an xml export of my nodes' uuids, ordered by node type. Like this I can pick
some uuids in the export and pass them to JMeter. But I'd like to be able to test also the
getNode "by path" method extensively.

Frédéric Esnault

-----Message d'origine-----
De : Jukka Zitting [mailto:jukka.zitting@gmail.com] 
Envoyé : mardi 26 juin 2007 21:58
À : users@jackrabbit.apache.org
Objet : Re: getNode without the name


On 6/26/07, Frédéric Esnault <fesn@legisway.com> wrote:
> I was wondering, is there a way to get a node (with NodeImpl.getNode() or something
> else), to get a node without knowing its name ?

How about using Session.getNodeByUUID()?

It sounds like you already know something about the node (otherwise
you wouldn't be able to identify it), so you're done if you can make
that "something" be the UUID of the node.


Jukka Zitting

View raw message