tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From exabrial <exabrial+open...@gmail.com>
Subject Re: Using @EJB/@Inject to lookup on remote interface running on separate standalone OpenEJB server
Date Mon, 02 Jul 2012 00:11:14 GMT
Hey sorry to wake a dead thread... but I just thought of something: Does
OpenEJB has a jndi-link feature?

I don't think it does, but I know GlassFish and Resin can do it....
http://www.caucho.com/resin-3.0/config/env.xtp#jndi-link

Would writing a custom ObjectFactory be the correct way to do this?

In my frontend JSF application, in a servlet, say I had:

@EJB
MyService myService;

If I wanted to link that EJB to an external context, I would put something
in TomEE.xml like this:

	<JndiProvider id="shoe" type="javax.naming.InitialContext">
		java.naming.provider.url = ejbd://localhost:3201
		java.naming.factory.initial =
org.apache.openejb.client.RemoteInitialContextFactory
	</JndiProvider>

	<Resource id="MyService"
type="org.apache.openejb.xxx.OpenEJBExternalJndiLink">
		externalContext = "shoe"
		externalName="MyDeploymentId/MyService.Remote"
	</JndiProvider>

I'm willing to write this with a little bit of direction... What interface
or base class would  "org.apache.openejb.xxx.OpenEJBExternalJndiLink" to
implement/extend to get it to show up in the local JNDI tree? Is there an
example I could look at?

--
View this message in context: http://openejb.979440.n4.nabble.com/Using-EJB-Inject-to-lookup-on-remote-interface-running-on-separate-standalone-OpenEJB-server-tp4655814p4655941.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message