jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Huddleston" <rhudd...@gmail.com>
Subject Simpler JNDI client Repository lookup?
Date Thu, 03 Jul 2008 15:07:40 GMT
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)
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?

View raw message