Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Annotation packaging" Watch "Annotation packaging" New topic
Author

Annotation packaging

Alexandre Fradin
Greenhorn

Joined: Jul 29, 2008
Posts: 11
Hi,

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?


    SCJP
    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: http://oreilly.com/catalog/9780596009786/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%)
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Annotation packaging
     
    Similar Threads
    JSF EJB project problem
    DataTable datas are not actual
    Difference between javax.ejb.EJB and javax..annotation.EJB?
    To map backing bean from a selected drop-down value
    <h:commandLink> rendered not updating on logout