Hi all,
tried on another configuration with no success!
I tried to remember why I ended up using the
org.apache.jackrabbit.core.WorkspaceImpl(W).createWorkspace("W2") method
so went back to google "JCR create workspace"
first link :
<http://jackrabbit.apache.org/frequently-asked-questions.html>The *JCR* API
does not contain features for *creating* or managing *workspaces*, so you
need to use Jackrabbit-specific functionality for *creating* new *workspaces
*. *...*
jackrabbit.apache.org/frequently-asked-questions.html
following the link...
How do I create new workspaces in Jackrabbit?
The JCR API does not contain features for creating or managing workspaces,
so you need to use Jackrabbit-specific functionality for creating new
workspaces. You can create a new workspace either manually or
programmatically.
The manual way is to create a new workspace directory within the repository
home directory and to place a new workspace.xml configuration file in that
folder. You can use the configuration file of an existing workspace as an
example, just remember to change the name of the workspace in the Workspace
name="..." tag. See the Jackrabbit
Configuration<http://jackrabbit.apache.org/jackrabbit-configuration.html>page
for configuration details. Note also that you need to restart the
repository instance to access the new workspace.
The programmatic way is to acquire a Workspace instance using the normal JCR
API and to cast the instance to the JackrabbitWorkspace interface. You can
then use the createWorkspace(String) method to create new workspaces.
I was misguided by the first paragraph... Who could update the FAQ?
thx
jgr
2010/3/16 Joseph Ottinger <[email protected]>
> The only issue I have with the primer so far: no code! (That's not to say
> Jochen didn't do a really, really good job, because it's an excellent
> primer
> on concepts.)
>
> I was thinking something like a "howto" with sample code. The first hops
> are
> okay, but they're so light that they're not workable in practice. No
> locking, and they're JSR170 rather than the JCR 2.0 spec...
>
> On Tue, Mar 16, 2010 at 9:00 AM, Joseph Ottinger <[email protected]
> >wrote:
>
> > Thanks, Rakesh. Reading further now.
> >
> >
> > On Tue, Mar 16, 2010 at 8:42 AM, Rakesh Vidyadharan <[email protected]
> >wrote:
> >
> >>
> >> On 16 Mar 2010, at 07:35, Joseph Ottinger wrote:
> >>
> >> > Is there a wiki that's collecting the "right way" to do all this
> stuff?
> >>
> >> The "right way" is usually to try and use only the JCR API (similar to
> >> using JDBC for instance). Google for JCR tutorials and you will get
> some
> >> good links.
> >>
> >> http://jtoee.com/jsr-170/the_jcr_primer/
> >>
> >> Rakesh
> >
> >
> >
> >
> > --
> > Joseph B. Ottinger
> > http://enigmastation.com
> >
>
>
>
> --
> Joseph B. Ottinger
> http://enigmastation.com
>