If you have an idea how to make our doc better or want to write a getting
started for your case just attach a markdown to a tomee jira and we ll
pushbit on the website.

Happy you made it working :)
Le 20 juil. 2015 16:34, "Rohan Beckles" <[email protected]> a écrit :

> Hi Romain, Uday --
>
> I can report success! :D
>
> 1.  The JackRabbit Resource Adapter is indeed bound to
> "java:openejb:Resource/jackrabbit-jca-2.8.0RA".
> I accessed it with the following code:
>
> Context initialContext = new InitialContext();
> Context envContext = (Context) initialContext.lookup("openejb:Resource");
> Object o =  envContext.lookup("jackrabbit-jca-2.8.0RA");
> System.out.println(o.getClass().getCanonicalName());
>
> However, this returns an instance of the actual ResourceAdapter interface,
> which is not what I'm looking
> for, so I tried this instead:
>
> Context initialContext = new InitialContext();
> Context envContext = (Context) initialContext.lookup("openejb:Resource");
> Object o =  envContext.lookup("jackrabbit-jca-2.8.0");
> System.out.println(o.getClass().getCanonicalName());
>
> This returns an instance of javax.jcr.Repository, which is precisely what
> I'm looking for.  From here I was able
> to store and retrieve XML in/from the content repository.
>
> 2.  My issues with the JNDI tree were actually caused by me overriding the
> Content environment
> properties in my tree printing code - the joys of cut & paste.  Romain's
> suggestion to look at
> SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext()
> made me realise what the issue was.  Once that was resolved, the adapter's
> entries showed up correctly.
>
> 3.  This kind of info is no doubt scattered across several web pages, but
> hopefully once this makes it into the mailing
> list archives, it'll be easier for others to find. :)
>
> Best,
> --
> Rohan Beckles
> [email protected]
>

Reply via email to