>  I agree, to support authorization the method could be on JackrabbitSession:
>
>  void JackrabbitSession.shutdownRepository() throws RepositoryException
>
>  Maybe with a boolean parameter forceShutdown to shutdown even if
>  others are connected, but such a method could be added later on as
>  well.
>
>  In my view it makes more sense on the session than on the workspace
>  because workspace objects don't necessarily have an authorization
>  context, same as repository objects. However session always have that.
that is not true. a workspace has the same authorization scope as the
session and is retrieved via the session. this is mandatory and
intentional since it offers methods like copy and clone which of
course need authorization, too.

the correct location for the shutdown method would be on the
repository, so passing the session could be another option:

Repository.shutdown(Session s);

or on some management object,

  RepositoryManagement Session.getRepositoryManagement()
  RepositoryManagement.shutdown()

this object could also be used for other 'admin' stuff, like nodetype
registration.

--
toby

>
>  By the way, there is SessionImpl.createDataStoreGarbageCollector that
>  is similar. Offtopic: this methods should probably also be added to
>  JackrabbitSession, but then we need to add a
>  JackrabbitGarbageCollector interface.
>
>  Regards,
>
> Thomas
>
>
>
>
>  On Mon, Apr 14, 2008 at 7:16 PM, Tobias Bocanegra
>  <[EMAIL PROTECTED]> wrote:
>  > hi,
>  >  i want to remove the shutdown method from the JackrabbitRepository
>  >  interface. the reason is that there should at least be some
>  >  authorization. so rather move that to workspace or session.
>  >  OTOH, since repository creation is not covered by the api, it's
>  >  destruction should be neither.
>  >
>  >  wdyt?
>  >
>  >  --
>  >  toby
>  >
>

Reply via email to