Hey

Constantine Plotnikov wrote:
> 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).

Since there isn't much more than "lookup" that should be supported for
the bean, I agree that b is better. I'd vote for getResource! :-)

Which would remove the JNDI thing altogether, although
ctx.getResource("ejb") will return a javax.naming.Context.

/R

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

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