Gene Chuang wrote:
>
> Hi Alex,
>
> > The point of reference where you decide to create new InitalContext()
> could determine the values placed into the initial context.
>
> Which app server are you using? Because the way I understand it, the
> Environment Naming Context local to a bean is completely INDEPENDENT of the
> InitialContext instance. Rather, the ENC is ThreadLocal to the bean
> instance, just like ACL and Principle info. At least this is the behavior I
> get on Weblogic 5.1.
>
> In our architecture, we have EJBs A, B, C. But they all extend
> AbstractEJBean (look at my pattern on theserverside.com
> http://www.theserverside.com/patterns/thread.jsp?thread_id=7270), which
> contains a static reference to InitialContext: i.e. all instances of A, B
> and C use the same InitialContext. However, they do have different ENC
> values of the same key, and in runtime they do resolve to their appropriate
> values!
Surely that is app server-specific? From my reading of JNDI documents, a
conformant implementation of new InitialContext() could return a stateful object
that holds the information itself without reference to the thread.
In which case your pattern would not work.
========================================
Ian McCallion
Alexis Systems Limited
Romsey, UK
Tel: +44 1794 514883
Fax: +44 1794 501692
========================================
===========================================================================
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".