jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller" <thomas.tom.muel...@gmail.com>
Subject Re: Using jackrabbit repository remotely
Date Wed, 04 Oct 2006 09:41:20 GMT
Hi,

I am currently writing a Trace/Log wrapper for the JCR API, and I ran into
the same problem. I think this functionality should be included in the next
JCR API (as part of JSR 283). But I don't know how long this will take?
Short / medium term, I think there are other solutions / workarounds:

- For those interfaces that need to be extended, create new interfaces as
part of Jackrabbit, and let them extend the JCR API. Then use those
interfaces instead of the JCR API for the RMI API and the log/trace wrapper.
The application then just casts to the new interfaces instead of the
implementation.

- Alternative solution: Create a public utility class with some public
static methods. Example: JcrUtils.registerNodeType(NodeTypeManager,
InputStream nodeTypeDef). This utility class calls the relevant method(s)
via reflection. For the log/trace wrapper this should be quite easy to
implement, it is probably a little harder for RMI API.

Thomas


On 10/4/06, Eknath Kadam <eknathkadam@yahoo.com> wrote:
>
> I dont what to do about this problem. When connected to a remote
> repository
> using JNP, I see that a couple of repository admin functions are not
> available.
>
> For example,
> 1. Registering cutom nodes.
>   Workspace wsp = session.getWorkspace();
>   NodeTypeManager ntMgr = wsp.getNodeTypeManager();
>   NodeTypeRegistry ntReg = ((NodeTypeManagerImpl)
> ntMgr).getNodeTypeRegistry();
>   ntReg.registerNodeType(nodeTypeDef);
> Above code will throw ClassCastException when trying cast NodeTypeManager
> to
> NodeTypeManagerImpl
>
> 2. Creating a new workspace remotely is also not supported
> ((org.apache.jackrabbit.core.WorkspaceImpl
> )workspace).createWorkspace(name);
>
> 3. or shutting down a repository.
> ((org.apache.jackrabbit.core.RepositoryImpl) session.getRepository
> ()).shutdown();
>
> I was informed by Jukka that JCR-RMI only supports the standard JCR
> interfaces,
> so you can't cast the adapters to Jackrabbit-specific classes.
>
> I understand this but is there any other way or workaround to perform
> these
> functions? Our system would go live soon and before that I need to figure
> out
> how I can do this remotely.
>
> Thanks,
> Eknath
>
>
>

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