GeeCON Prague 2014*
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


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: 577

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: 1686
    
  25

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: 577

Thanks Frits, appreciate that.
 
Don't get me started about those stupid light bulbs.
 
subject: @Resource only on @Target(value={TYPE,FIELD,METHOD})