jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Granduel <jgrand...@gmail.com>
Subject Re: Accessing workspace other than default ?
Date Tue, 16 Mar 2010 12:32:38 GMT
Hi Justin,

thank you for your answer.

2010/3/16 Justin Edelson <justinedelson@gmail.com>

> Why are you using the Jackrabbit implementation classes? The *only* way you
> should be creating a workspace is via the JCR API:
> session.getWorkspace().createWorkspace("W2"). Using internal APIs for
> something which can be done through the JCR API is unnecessarily
> complicated
> and will get you into trouble (as well as being non-portable FWIW).
>
> Do it the correct way and if you still don't see your newly created
> workspace via WebDav, repost to the mailing list.
>
Well, I do it this way... because I'm learning and the first solution I've
found is just a wrong one...

That said, I tried out the solution you provided :
session.getWorkspace().createWorkspace("W2").
which of course created the workspace folder in the right repository folder.
But it's still invisible in the browser through http://localhost:8080/serveror
http://localhost:8080/repository...

Thanks for your help,
jgr

>
> Justin
>
> On Tue, Mar 16, 2010 at 7:48 AM, Jacques Granduel <jgranduel@gmail.com
> >wrote:
>
> > Hi all,
> >
> > I'm new to Jackrabbit, and I'm exploring JCR specs with it.
> > I've been able to create a new workspace
> >
> > //org.apache.jackrabbit.core.XAWorkspace
> > W = session.getWorkspace()
> > org.apache.jackrabbit.core.WorkspaceImpl(W).createWorkspace("W2")
> > session.save()
> >
> > The W2 workspace is created in Jackrabbit/repository/workspaces/W2 as
> > expected.
> > I cannot access this workspace with a url :
> > http://localhost:8080/server
> > Available Workspace Resources:
> >    * default
> >    * security
> > http://localhost:8080/server/W2
> > <dcr:class>javax.jcr.NoSuchWorkspaceException</dcr:class>
> > <dcr:message>W2</dcr:message>
> >
> > idem with http://localhost:8080/repository/W3
> >
> > Could you tell what I should do to make it accessible from a URL ?
> >
> > BTW, I don't understand why a workspace is needed in WorkspaceImpl
> > constructor.
> >
> > Thanks in advance,
> > Best regards
> > jgr
> >
>

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