Hi Andreas. I just added the following three lines to my
conf/system.properties:
java.naming.factory.initial =
org.apache.openejb.client.LocalInitialContextFactory
openejb.deploymentId.format = {ejbJarId}/{ejbName}
openejb.jndiname.format = {deploymentId}/{interfaceType.annotationNameLC}
This let me access my EJBs using the format I wanted, i.e.
tomeetest/ApplicationManager/remote . The JAR file I deployed was called
tomeetest.jar. I'm not using an EAR file in this case. I pulled the
formatting options from http://tomee.apache.org/jndi-names.html, which I'm sure
you've already pored over.
Beyond that, I'm completely new to TomEE, so I'm not much help.
- Andrew.
On 2013-05-28, at 09:40, AndreasN <[email protected]> wrote:
> I have a similar situation as Andrew had, but I didn't get it working.
>
> The static constant of a particular JBoss EJB interface class is constructed
> this way:
>
> EARName/ImplementationClass/remote
>
> When I do a lookup, it only works by prefixing and remove the remote token:
>
> ITestBeanIntf obj = context.lookup("global/ProtocolTests/" +
> ITestBean.JNDI_NAME.split("remote")[0]);
>
> I would like to have it:
>
> ITestBeanIntf obj = context.lookup(ITestBean.JNDI_NAME);
>
> In the log I noticed 3 items in the OpenEJB startup sequence, whereas the
> first item I'm interested in:
>
> Jndi(name=EarName/ImplementationClass/remote) -->
> Ejb(deployment-id=ImplementationClass)
>
> Jndi(name=global/ProtocolTests/EarName/ImplementationClass!de.x.y.z.InterfaceImplementationClass)
> --> Ejb(deployment-id=ImplementationClass)
>
> Jndi(name=global/ProtocolTests/EarName/ImplementationClass) -->
> Ejb(deployment-id=ImplementationClass)
>
> The bindings are only performed for the last 2 items (but this seems to be
> ok considering the complete test suite mentioned before, within it works
> outside the ApplicationComposer but with too heavy loads)
>
> bound ejb at name:
> openejb/Deployment/ImplementationClass/de.x.y.z.InterfaceImplementationClass,
> ref: org.apache.openejb.core.ivm.naming.BusinessRemoteReference@56c48
>
> bound ejb at name:
> openejb/Deployment/ImplementationClass/de.x.y.z.InterfaceImplementationClass!Remote,
> ref: org.apache.openejb.core.ivm.naming.BusinessRemoteReference@56c48
>
> Please drop a note...
>
> Kind regards,
> Andreas
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/How-to-create-JNDI-interface-in-Application-Composer-later-tp4663243p4663272.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.