Newbie wrote:
> InitialContext context = new InitialContext();
> Object object = context.lookup("ejb/Hello");
> HelloHome home =
> (HelloHome)PortableRemoteObject.narrow(object,
If this "client" code is running outside of your J2EE container (JBoss),
you need to give the context the JNDI provider class and the URL for
connecting to the JNDI service. For example, here's how we do it with
WebLogic:
Properties props = new Properties ();
props.put ("java.naming.factory.initial",
"weblogic.jndi.WLInitialContextFactory");
props.put ("java.naming.provider.url", "t3://localhost:80");
Context ctx = new InitialContext(props);
Then you lookup the object just as you have above and narrow it.
David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user