Rickard �berg wrote:
> > BTW I'm very amused why not return JNDI Context from
> > EJBContext. There will be the same URL for all beans
> > and it will be simpler and faster to get it from
> > EJBContext then to create it in specific bean context.
> > (Vlada or Mark, could you please explain it?).
>
> Agree.
>

I see there following alternatives in API:

a) make method that return JNDI context
   for example:
   CartHome h = (CartHome)ctx.getContext().lookup("ejb/Carts");

b) make method that lookup resource for bean:
   for example:
   CartHome h = (CartHome)ctx.getResource("ejb/Carts");

   There may be alternatives for naming of this method:
   for example:
   * lookupResource()
   * getResource()
   * lookupService()
   * getService()
   * feel fre to come with better name/

I like (b) more because it is more close to semantics of resolving
external references and do not req1uire knowledge of JNDI from
bean developer (which is good IMHO).

Constantine

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