jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: How do I create more workspaces
Date Thu, 07 Jul 2005 08:14:06 GMT
Hi Richard,

Richard Osbaldeston wrote:
> Apologies if this is a really dumb question but how can I create 
> multiple workspaces with jackrabbit? Passing a named workspace into the 
> login returns a "javax.jcr.NoSuchWorkspaceException", but will create a 
> new default workspace if it dosnt already exist and trawling over the 
> API hasn't helped. The repository.xml file seems to define a workspace 
> template rather than a list of workspaces (at least that's how I read it).

that's correct.

> Ah, as I'm typing I can see createWorkspace() on SessionImpl -- I guess 
> I'm supposed to cast an active session object to the jackrabbit 
> SessionImpl and call that?

Creating workspaces is not covered by jsr-170. It is considered an 
administrative task and therefore implementation specific.

Jackrabbit allows you to programmatically create a new workspace by 
calling WorkspaceImpl.createWorkspace()

You may also create a new workspace by creating a new workspace folder 
and placing a new workspace.xml configuration in that folder.
As a quick start you can simply copy the workspace.xml from the default 
workspace and change the workspace name:
<Workspace name="secondWorkspace">

Jackrabbit will pick up all workspace.xml files it can find in 
subdirectories of <repository.home>/workspaces and instantiate them on 
startup.

regards
  marcel

Mime
View raw message