another noob question. I have the following codes
Node root = session.getRootNode();
Node assets = root.addNode("assets");
// Store content
Node asset = assets.addNode("asset");
asset.setProperty("url", "http://asset1url.org");
asset.setProperty("name", "Asset 1");
asset.setProperty("typetype", "image");
Node asset2 = assets.addNode("asset");
asset2.setProperty("url", "http://asset2url.org");
asset2.setProperty("name", "Asset 2");
asset2.setProperty("type", "image");
session.save();
and then
Node root = session.getRootNode();
Node assets = root.getNode("assets");
assets.remove();
session.save();
the more I run the test, the more nodes I get. Seems like the data in the
TransientRepo is being stored on the disk. The remove is not cleaning it
up. For why?
On Fri, Jul 18, 2008 at 10:40 AM, Michael Harris <[EMAIL PROTECTED]>
wrote:
> hmm thanx -- I could have looked in the api for that....sorry
>
>
> On Fri, Jul 18, 2008 at 10:33 AM, Alexander Klimetschek <[EMAIL PROTECTED]>
> wrote:
>
>> On Fri, Jul 18, 2008 at 3:22 PM, Michael Harris
>> <[EMAIL PROTECTED]> wrote:
>> > So from advice received in another thread, I have a test environment
>> that
>> > uses a SimpleWebdavServlet extension running in jetty, which is embedded
>> in
>> > a test harness. From that I can sort of list the contents of the
>> > TransientRepo created by the Servlet.
>> >
>> > 1. The TR goes away if its session is closed. Is there any way to get
>> a
>> > session that needs to be explicitly closed?
>>
>> AFAIK it goes away if the last session is closed. You could keep a
>> dummy session.
>>
>> > 2. With a TR can I programmatically configure the repo root directory?
>>
>> TransientRepository repo = new
>> TransientRepository("/path/to/repository.xml",
>> "/path/to/repository-home");
>>
>> The second param is the repository home directory (if that is what you
>> mean by root dir).
>>
>> Regards,
>> Alex
>>
>>
>> --
>> Alexander Klimetschek
>> [EMAIL PROTECTED]
>>
>
>
>
> --
> ---------------------
> Michael Harris
>
--
---------------------
Michael Harris