my dog learned polymorphism*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @Resource only on @Target(value={TYPE,FIELD,METHOD}) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@Resource only on @Target(value={TYPE,FIELD,METHOD})" Watch "@Resource only on @Target(value={TYPE,FIELD,METHOD})" New topic
Author

@Resource only on @Target(value={TYPE,FIELD,METHOD})

Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Again referring Enterprise Java Beans 3.pdf (by Frits, page number 2-16). There is a code block in which @Resource is used within a business method. But, it is not allowed according to @Resource annotation as the @Target can only be {TYPE,FIELD,METHOD}. You get compilation error if used. Has anybody noticed this?




Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1628
    
  23

Yes, that is a mistake. Thanks for pointing that out.

I will change that over the weekend.

Regards,
Frits
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Thanks Frits, appreciate that.
 
Consider Paul's rocket mass heater.
 
subject: @Resource only on @Target(value={TYPE,FIELD,METHOD})
 
Similar Threads
STRUTS:client-side validation using validation.xml for hidden field results in error
Help Requested --> Yep, it's a verifier message!
weblogic ejb
EJB QL RETURNING ONLY THE FIRST RECORD OF THE TABLE
How to deploy CMP Entity Bean in Jboss 3