File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes query related to enterprise bean environment ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "query related to enterprise bean environment ?" Watch "query related to enterprise bean environment ?" New topic

query related to enterprise bean environment ?

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924

section 16.2.3 of ejb 3. 1 specs say

Environment entries may be declared by the use of annotations, without need for any deployment descriptor entries

which annotations is used to achieve this ?

i have searched the api and couldnt find any annotation that declares environment entries. i know we can declare @Resource on bean class which declares an environment entry in the beans jndi context but DOES NOT injects it. to give value to the jndi name i have to use <env-entry>. is the spec ONLY talking about declaring(as in @Resource on bean class) and NOT giving the value ? Please clarify. thanks dear ranchers.
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper

Joined: Apr 07, 2010
Posts: 2092

In this section they are talking about all sorts of environment entries, so also EJBs that are injected by @EJB. You are right about the simple-environment-entries (String, Character, Integer, Boolean, Double, Byte, Short, Long, and Float). Those ones need a value for the injection to take place.

I agree. Here's the link:
subject: query related to enterprise bean environment ?
It's not a secret anymore!