Hey everybody,
i just need some help.
i want to add some environment entries to my ejb.
i added the tags to the ejb-jar.xml file
<env-entry>
<env-entry-name>myEntry<env-entry-name>
...
</env-entry>
and deployed the ejb (in jboss 2.4).
then i tried to lookup the environment entries from
a remote client like this:
Context ctx = (Context)someContext.lookup("java:comp/env");System.out.println((String)ctx.lookup("myEntry"));
But Everytime i get a
"javax.naming.NameNotFoundException: comp not bound"
I can lookup the ejb itself, but no environment entry.
What is wrong with this ???
Thanks
-
Environment Entries (3 messages)
- Posted by: Andreas Grohmann
- Posted on: July 10 2003 09:53 EDT
Threaded Messages (3)
- Environment Entries by Brian Tinnel on July 10 2003 10:08 EDT
- Environment Entries by Andreas Grohmann on July 10 2003 10:10 EDT
- Environment Entries by Raffi Basmajian on July 10 2003 11:10 EDT
-
Environment Entries[ Go to top ]
- Posted by: Brian Tinnel
- Posted on: July 10 2003 10:08 EDT
- in response to Andreas Grohmann
You can't look up environment entries from a remote client. They are only for the use of the bean they are defined with. -
Environment Entries[ Go to top ]
- Posted by: Andreas Grohmann
- Posted on: July 10 2003 10:10 EDT
- in response to Brian Tinnel
YOU SAVED MY DAY
THANKS -
Environment Entries[ Go to top ]
- Posted by: Raffi Basmajian
- Posted on: July 10 2003 11:10 EDT
- in response to Brian Tinnel
Yes, that's true, the client does not have direct access to the environment entry, but there is nothing stopping you from adding a method to your EJB that accesses the ENC for the client and returns the value.
Raff