Rickard,

I must say I find it curious that when discussing the JNDI context,
you say: "a helper class being used by the bean is considered a part
of the bean", but when discussing the rules about file I/O, such as:

        An enterprise bean must not use the java.io package to attempt
        to access files and directories in the file system.

you say that the helper class may or may not be part of the bean,
depending on which class loader is used.  Thus, you argue the helper
class may be exempt from the above rule.

IMO, a helper class is always part of the bean, both for JNDI, and for
file I/0.

Thoughts?

-jkw

Rickard �berg wrote:
>
> Hi!
>
> Heiko Gottschling wrote:
> > Do these helper objects "inherit" the JNDI context of the bean from which
> > they are called?
>
> Yes. The JNDI context is considered to belong to the bean, and a helper
> class being used by the bean is considered a part of the bean.
>
> > In other words, can every object which is called from a bean
> > access the bean's JNDI context?
>
> Yes.
>
> > Where is this behavior specified?
>
> Nowhere AFAIK, but there's no restriction against this either.
>
> > Are there
> > any restrictions?
>
> No.
>
> <vendor>
> In JBoss the java:comp/env implementation uses the context classloader
> (CCL) of the thread to determine what namespace is being accessed. The
> CCL is set when the bean is called, and reset when the bean call is
> finished. In between all lookups of java:comp/env, or any subcontext
> thereof, will be done with the beans local namespace. These calls may be
> done by any class, bean or utility class or whatever.
> </vendor>
>
> /Rickard

===========================================================================
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".

Reply via email to