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
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 ???
You can't look up environment entries from a remote client. They are only for the use of the bean they are defined with.
YOU SAVED MY DAY
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.