jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Ottinger <dreamr...@gmail.com>
Subject Re: Accessing workspace other than default ?
Date Tue, 16 Mar 2010 14:29:06 GMT
Speaking from personal experience, MOST JCR information is hard to find. :(

On Tue, Mar 16, 2010 at 10:26 AM, Justin Edelson <justinedelson@gmail.com>wrote:

> On 3/16/10 8:32 AM, Jacques Granduel wrote:
> > 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...
> I'm just unsure how the first solution was an internal API and not a
> line of code from the spec. It's an interesting result from a
> findability perspective.
>
> >
> > 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...
>
> What version of Jackrabbit are you using?
> What persistence manager?
> Is there anything relevant in the log files?
>
> I'm using this same API call on a bit of code I'm working on now and
> it's working for me with JR 2.0.0.
>
> Justin
>
> >
> > 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
> >>>
> >>
> >
>
>


-- 
Joseph B. Ottinger
http://enigmastation.com

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