jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Bloomfield Ramagem" <daniel.rama...@gmail.com>
Subject New Workspace Initialization & Jackrabbit Resource Adapter
Date Mon, 05 Feb 2007 20:40:45 GMT
I'm trying to create a new workspace from within a servlet that has a
reference to the Jackrabbit Resource Adapter (RAR).  The new workspace
directory seems to get only partially initialized however--there is only the
workspace.xml file inside of the newly created workspace.

For example, before running my code I have the normal default workspace:


But after creation of a new "foo" workspace I only have the following for
this new workspace:


In the logs I also don't see the typical initialization messages I see for

INFO  [RepositoryImpl] initializing workspace 'default'...
INFO  [LocalFileSystem] LocalFileSystem initialized at path
INFO  [LocalFileSystem] LocalFileSystem initialized at path
INFO  [RepositoryImpl] workspace 'default' initialized
INFO  [SearchIndex] Index initialized: C:/jackrabbit-repo/repository/index
INFO  [SearchIndex] Index initialized:

Am I missing something?  I thought creation of a new workspace basically
involved casting a workspace into JackrabbitWorkspace and calling the
"createWorkspace" method.  Then, upon first login into the new workspace all
of the workspace structures would get created.

It's almost as if with the RAR it's delaying the initialization of the
workspace?  How do I "force" initialization of this new workspace?

This is my code:

Context ctx = new InitialContext();
Repository repository = (Repository) ctx.lookup("java:comp/env/jackrabbit");
Credentials credentials = new SimpleCredentials("username",
Session session = repository.login(credentials);
Workspace workspace = session.getWorkspace();
JackrabbitWorkspace jws = (JackrabbitWorkspace) workspace;
// login to force the initalization of the workspace now rather than later
session = repository.login(credentials, workspaceName);
Node root = session.getRootNode();



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message