Thanks Mohammad. The first approach will be easier to implement as
well :) as i just need to create a linkref to java:comp/EJBContext for
all the other defined resource env references

Regards
Manu

On 1/10/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:
Hi Manu...

On 1/10/07, Manu George <[EMAIL PROTECTED]> wrote:
>
> Hi,
>       I have a doubt regarding the availability of the SessionContext
> or MessageDrivenContext object. The spec says that
>
> The container must make a component's EJBContext interface available
> either through injection using the Resource annotation or in JNDI
> under the name java:comp/EJBContext. The authenticationType and
> shareable elements of the Resource annotation must not be specified.
> An EJBContext object reference may also be declared in a deployment
> descriptor in the same way as a resource environment reference. Such a
> deployment descriptor entry may be used to specify injection of an
> EJBContext object.
>
> Now is it ok if both are there i.e. The SessionContext or
> MessageDrivenContext  is always bound to the JNDI ENC of the EJB with
> the name java:comp/EJBContext and if you specify in dd a
> resource-env-ref with some other name then the EJBContext is bound to
> that name as well.
> OR
> It should be that if we specify the resource-env-ref then there
> shouldn't be an EJBContext bound at java:comp/EJBContext.


I think the first choice is more correct, as in either case we are
specifying JNDI name refs, AFAIU the default created context is
*java:comp/EJBContext*, and a component developer can create new name refs
for SessionContext\MessageDrivenContext as well.

Thanks
> Manu
>



--
Thanks
- Mohammad Nour


Reply via email to