Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy that is presented to users upon registration and which we try to strictly enforce. Please re-read this document and edit your display name accordingly.
As for your question, what kind of errors are you getting?
As your Action cannot be an application client, I would expect environment properties (in a Hashtable) to be passed into the constructor of InitialContext. Check your EJB container's documentation for what you need to do.
Object not found in lookup, the entire lookup is ejb/facade.
The problem persists even with lookups that specify java:comp/env/ejb/facade or java:/ejb/facade.
The problem goes away if I use the runtime JNDI assigned by the server from NetWeaver's visual admin tool.
My questions are:
1. If I add the target bean to web.xml, can I still not use the reference name to lookup the object from the struts controller (actionclass)?
2. If not, the java:comp/env/ lookup cannot ever be used from a struts controller? I will have to stick with the runtime JNDI assignment made by the EJB container to the bean? This would cause obvious problems since the JNDI has to be hard-coded within the actionclass, not to mention maintenance if my application has to be ported on a different app server.
Roger: I have not passed initialcontext() parameters, but I can access the facade bean using direct JNDI lookup.
Any insights/corrections will be appreciated. [ July 04, 2005: Message edited by: Radhakrishnan Iyyengar ]
The human mind is a dangerous plaything. This tiny ad is pretty safe:
Devious Experiments for a Truly Passive Greenhouse!