[jboss-user] [JNDI/Naming/Network] - Re: JNDI Look up in JBoss 4.0.5GA
itsme
do-not-reply at jboss.com
Tue Jun 26 11:04:45 EDT 2007
as your jndiView states different local interfaces should be located right in the GlobalNameSpace. So they should be looked up via
new InitialContext().lookup(<InterfaceName>);.
Besides that there are some ejb's bound to ejb/, so ejb/ should be used for lookup code.
As far as I can see from your JndiTrace it should be possible to retrieve the home interface like this (i.e. for SessionMaterial found here
anonymous wrote :
| +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
| +- ejb (class: org.jnp.interfaces.NamingContext)
| | +- SessionMaterial (proxy: $Proxy76 implements interface com.skandia.model.session.material.SessionMaterialHome,interface javax.ejb.Handle)
| | +- SessionCodes (proxy: $Proxy74 implements interface com.skandia.model.session.codes.SessionCodesHome,interface javax.ejb.Handle)
|
| ...
| Object obj = ictx.loopup("ejb/SessionMaterial");
| SessionMaterialHome home = PortableRemoteObject.narrow(obj, SessionMaterialHome.class);
| SessionMaterial ejb = home.create();
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057752#4057752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057752
More information about the jboss-user
mailing list