You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Richard Huddleston <rh...@gmail.com> on 2008/07/03 17:07:40 UTC
Simpler JNDI client Repository lookup?
I'm using the standard way of getting access to the jackrabbit
repository in the context of a jboss client app
InitialContext ctx = new InitialContext(env);
ClientAdapterFactory adapter = new ClientAdapterFactory();
RemoteRepository rr = (RemoteRepository)
ctx.lookup("jnp://localhost:1099/jcrServer");
Repository repository = adapter.getRepository(rr);
it works, but the downside is that i have to distribute jackrabbit
jars containing ClientAdapterFactory and RemoteRepository classes in
addition to the jcr-1.0.jar (which is all that i want).
ideally, i'd like to just distribute the jcr-1.0.jar to my clients and
do a lookup like:
InitialContext ctx = new InitialContext(env);
Repository repository = (Repository ) ctx.lookup("jnp://localhost:1099/jcr");
is this possible in a remote jboss client app?
Re: Simpler JNDI client Repository lookup?
Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Jul 3, 2008 at 5:07 PM, Richard Huddleston <rh...@gmail.com> wrote:
> ideally, i'd like to just distribute the jcr-1.0.jar to my clients and
> do a lookup like:
>
> InitialContext ctx = new InitialContext(env);
> Repository repository = (Repository ) ctx.lookup("jnp://localhost:1099/jcr");
>
> is this possible in a remote jboss client app?
No, since the jcr-1.0.jar only contains the JCR API, which is mostly
interfaces, but does not contain a generic RMI client that implements
those interfaces. The RMI client must be provided by the
implementations, such as Jackrabbit. The RMI client is made up of the
ClientAdapterFactory, RemoteRepository and other RMI stubs you already
distribute to the client. This is correct and expected.
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com