Hi

First of all ensure that jcr-2.0.jar is included in the TomEE lib directory. 
After that you can get Resource adaptor instance via the following statements:

1- Context jndiContext = 
SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();
  jndiContext.lookup("openejb:Resource/jackrabbit-jca-2.8.0RA”) OR
  jndiContext.lookup(“openejb/Resource/jackrabbit-jca-2.8.0RA”)

2- new InitialContext().lookup("java:openejb/Resource/jackrabbit-jca-2.8.0RA”)

Best

Uday

> On 20 Jul 2015, at 15:00, Romain Manni-Bucau <[email protected]> wrote:
> 
> This is an aggregated tree not listable as this IIRC.
> 
> SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext()
> is the one.
> Le 20 juil. 2015 13:44, "Rohan Beckles" <[email protected]> a écrit :
> 
>> Hi Romain --
>> 
>> Under the "java:global" tree I get
>> 
>> *****PRINTING java:global JNDI TREE*****
>> -->openejb: org.apache.openejb.core.ivm.naming.IvmContext
>>    -->openejb: org.apache.openejb.core.ivm.naming.IvmContext
>> 
>> -->ConfigurationInfo!org.apache.openejb.assembler.classic.cmd.ConfigurationInfo:
>> org.apache.openejb.core.ivm.naming.BusinessRemoteReference
>> 
>> There is nothing available under either "java:openejb" or
>> "openejb:Resource".  Basically, the end
>> result I'm looking for is to be able to do the following (pseudo Java):
>> 
>> Context initialContext = new InitialContext();
>> Context envContext = initialContext.lookup("java:comp/env" |
>> "java:global");
>> java.jcr.Repository repository = envContext.lookup("openejb/jackrabbit" |
>> "ra/jackrabbit"):  //or whichever name it's mapped to.
>> 
>> So which tree would the resource adapter(s) be mapped under?
>> 
>> Many thanks,
>> --
>> Rohan Beckles
>> [email protected]
>> 
>> 

Uday Gire
ManageCat Support
[email protected]



Reply via email to