You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Farrokh <fa...@gawab.com> on 2004/03/19 11:08:13 UTC

Help with StrutsStudio


Has anyone used JNDI Naming for Excadel Struts Studio using
Tomcat Server 4.

following is the code (how it shud be) for JNDI Naming for an
EJB with JNDI Name VesselManager 

Context ctx = new javax.naming.InitialContext();
Object ref = ctx.lookup("VesselManager");	
VesselManagerHome vesselManagerHome = (VesselManagerHome)
PortableRemoteObject.narrow(ref, VesselManagerHome.class);

vesselManager = vesselManagerHome.create();

According to Tomcat Documentatin .. it should be like this ::

Context ctx = new javax.naming.InitialContext();    Context
envCtx = (Context) ctx.lookup("java:comp/env");
Object ref2 = envCtx.lookup("VesselManager");	
VesselManagerHome vesselManagerHome = (VesselManagerHome)
PortableRemoteObject.narrow(ref2, VesselManagerHome.class);
vesselManager = vesselManagerHome.create();

.. any help for using EJBs in StrutsStudio Or even just struts
would be highly appreciated.

Thanks in Advance... farrokh.
________________________________
15 Mbytes Free Web-based and  POP3
Sign up now: http://www.gawab.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org