Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Annotation packaging

 
Alexandre Fradin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
     
    Michael Wiezik
    Ranch Hand
    Posts: 70
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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.
     
    Sergio Tridente
    Ranch Hand
    Posts: 329
    Java Linux Oracle
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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 ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic