Forums Register Login

Annotations for Environment Entries

+Pie Number of slices to send: Send
Annotations for Environment Entries

When the annotation is applied to the bean class , the jndi name and the environment entry type must be explicitly specified.



Injection of EJB References

The following example illustrates use of all portable elements of the EJB annotation. In this case, the
enterprise bean reference would have the name java:comp/env/ejb/shopping-cart in the
referencing bean’s naming context. This reference is linked to a bean named cart1.



In the example above, where is the explicit specification of the jndi name and the environment entry type? If not shown, how would it look? Or have I taken this out of context?
+Pie Number of slices to send: Send
I think "ejb/shopping-cart" is the JNDI name of myCart.
"ShoppingCart" is the environment entry type.
+Pie Number of slices to send: Send
That's has always been my interpretation as well. Although "explicitly specified" wording may perhaps be better worded as perhaps either implied, defaulted, or derived?
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1391 times.
Similar Threads
EJB 3.0 - Injecting EJB References - confusion
Enthuware Questio
Question reagarding beanName attribute of @EJB annotation
Finding resources
NameAlreadyBound exception when using InitialContext lookup
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:20:00.