Hi,
You should be able to add an alias in the
$CATALINA_HOME/conf/system.properties file
openejb.connector.jackrabbit-jca-2.8.0.aliases=jcr-repository
openejb.connector.jackrabbit-jca-2.8.0.skip-default=true
https://rmannibucau.wordpress.com/2013/09/25/tomee-and-resource-adapters/ is
where I found this information from.
- Mike Spencer
On 07/23/2015 10:51 AM, Rohan Beckles wrote:
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,