Karl-Fredrik Blixt schrieb:
> Jian Lin wrote:
> >
> > I know that some of the EJB servers let you create a Context object using
> > new InitialContext()
> > in a bean without providing any property values. I suppose that no
> > authentication is performed
> > here and it may work only if the EJB server is also providing the JNDI service.
> > Is this vendor-specific?
> >
> As far as I can remember the spec states that the server should provide the
> ability for a bean to do "new InitialContext()" to get a context that is
> implemented by the server. This was discussed some time ago regarding how to
> lookup bean settings ("comp/ejb"?). I suspect authentication is performed on a
> server basis (ie the server is authenticated and not the bean/bean caller), but
> I'm not sure.
>
> Just my 2 SEK IMHO FWIW etc :)
> /Kalle
>
> ===========================================================================
> 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".
Beans and/or Bean Provider don't have to deal with authentication. The result of
calling "new InitialContext()" should return a reference of type javax.naming.Context
-It is very important to a void getting initial context passing some environment
properties, this will greatly limit the bean portability. It doesn't matter how the
referenced JNDI Context is implemented. It could be the same reference as the bean's
EJBHome implementation or a proxy to the JNDI-File system implementation. It is fully
vendor-specific.
The behavior of calling "new InitialContext()" isn't predictable. It will greatly
vary accross vendor implementations and server configurations. Some EJB server
implemention will even allow you to change or setup the underlying JNDI
implementation.
regard.
Francis
--
Francis Pouatcha
MATHEMA Software GmbH
N�gelsbachstra�e 25 a
91052 E r l a n g e n
Telefon 09131/8903-0
Telefax 09131/8903-55
http://www.mathema.de
===========================================================================
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".