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.
Thanks
Manu