You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by ymaraner <tp...@gmail.com> on 2012/07/11 21:01:02 UTC
global JNDI usage by legacy J2EE 1.4 application
I have a legacy J2EE 1.4 application that looks up resources and EJBs using
global JNDI names outside of the "java:" namespace.
In WebSphere, WebLogic, and JBoss I was able to create JNDI entries for my
EJBs and Resources that looked like "foo/jdbc/BarDatasource" and
"ejb/com/foo/BarBeanHome".
The code looks them up like this:
DataSource datasource = (DataSource) new
InitialContext().lookup("foo/jdbc/BarDatasource");
com.foo.BarBeanHome barBean = (com.foo.BarBeanHome)
PortableRemoteObject.narrow(new
InitialContext().lookup("ejb/com/foo/BarBeanHome"),
com.foo.BarBeanHome.class);
I know it's ugly, but it's legacy code.
Is this possible in TomEE+ or does all of the legacy code need to change?
--
View this message in context: http://openejb.979440.n4.nabble.com/global-JNDI-usage-by-legacy-J2EE-1-4-application-tp4656239.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: global JNDI usage by legacy J2EE 1.4 application
Posted by exabrial <ex...@gmail.com>.
You should be able to do both....
For Datasources:http://openejb.apache.org/configuring-datasources.html
For EJBs:http://openejb.apache.org/jndi-names.html
--
View this message in context: http://openejb.979440.n4.nabble.com/global-JNDI-usage-by-legacy-J2EE-1-4-application-tp4656239p4656248.html
Sent from the OpenEJB User mailing list archive at Nabble.com.