would:

openejb.connector.jackrabbit-jca-2.8.0.aliases = jcr-
repositoryjcr-repository

work?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-07-23 8:51 GMT-07:00 Rohan Beckles <[email protected]>:

> Hi --
>
> Quick question:  now that I have the JackRabbit Resource Adapter up and
> running, I would like to
> be able to address it by a name other than jackrabbit-2.8.0.  Currently
> this is hard-coded into the
> lookup:
>
> Context initialContext = new InitialContext();
> Context envContext = (Context) initialContext.lookup("openejb:Resource");
> Repository repository = (Repository)
> envContext.lookup("jackrabbit-jca-2.8.0");
>
> I think TomEE uses the name of the extracted directory under ./apps to
> determine the JNDI reference
> name.   What I would like to do is to be able to reference it like this:
>
> Repository repository = (Repository) envContext.lookup("jcr-repository");
> or perhaps
> Repository repository = (Repository)
> envContext.lookup(STRING_JCR_REPOSITORY_NAME);
>
> to provide a level of indirection, enabling me to easily swap out
> repository implementations.  Where in
> TomEE can I specify an alternate JNDI name?
>
> Many thanks,
> --
> Rohan Beckles
> [email protected]
>

Reply via email to