This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Annotation packaging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Annotation packaging" Watch "Annotation packaging" New topic

Annotation packaging

Alexandre Fradin

Joined: Jul 29, 2008
Posts: 11

I'm using "Enterprise JavaBeans 3.0" (O'reilly). It's a good study boook, but I think there are some mistakes on annotation's package name.

We can found :
  • javax.annotation.PostConstruct and javax.ejb.PostConstruct
  • javax.annotation.EJB and javax.ejb.EJB

  • Owing to me, only the following annotations are correct :
  • javax.annotation.PostConstruct
  • javax.ejb.EJB

  • Is it right?

    Michael Wiezik
    Ranch Hand

    Joined: Mar 19, 2004
    Posts: 70
    Google says you are right.

    It also mentions some versions of JBoss use the non-standard packages (but it is reported as JBoss bug).

    "Enterprise JavaBeans 3.0" was written by the guy working on JBoss and all the code examples are given using JBoss container, so this is probably the reason you could find non-standard packages there.

    SCJP 1.4 - 88%
    SCBCD 5.0 - 90%
    SCEA - 81%
    Sergio Tridente
    Ranch Hand

    Joined: Mar 22, 2007
    Posts: 329

    It is just a misprint.

    Take a look at the book's errata: (it is under unconfirmed).
    [ August 20, 2008: Message edited by: Sergio Tridente ]

    SCJP 1.4 (88%) - SCJP 5.0 Upgrade (93%) - SCWCD 1.4 (97%) - SCBCD 5.0 (98%)
    wood burning stoves
    subject: Annotation packaging