On Mon, 29 May 2000 14:07:14 +0530, Shiv Kumar <[EMAIL PROTECTED]>
wrote:
>But can you explain more about the second part, which is 'place them in the JNDI
>tree'. Did you mean to say, read from properties file and bind to env context? I
>thought the bean's env was read only. Even if it were read-write, the env
>context is local to a bean. Is there a way to write to the env context in one
>bean and read it from another? A small code fragement would probably answer all
>my questions :-)
You are quite correct, the env. namespace (java:comp/env) is readonly. I
assume that he meant that you should bind it to the global namespace.
There are three problems (at least) with this:
* There may not be a global namespace. The only JNDI namespace that is
mandated by the EJB spec is the java: one.
* The solution assumes that it is possible to define a "application
startup". This may not be the case in a pure J2EE environment.
* The bindings may conflict with bindings from other applications or the
app server itself.
Again, the best way to do this is to use java:-bindings defined in the
deployment descriptor. As stated yesterday, if you find this to be
troublesome use a tool to do it (<vendor>such as my EJX tool</vendor>).
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".