This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Head First EJB

 
Anandg Joshi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Kathy,
I recently bought 'Head First EJB' book authored by you and Bert, and want to congratulate both of you for writing such an excellent book on a complex subject like EJB.
I bought and read many books on this subject and this book definitely comes top of my favourite list.
As i read sections/pages of the book, i noticed a few typos and like to ask /clarify the following items:
1. All the class diagrams use wrong UML symbol to show 'Generalization' and 'Realization'. It uses darker arrow to represent extension and implementation.
For example, the Remote and Local client views diagrams on Page 145 use non-uml symbol.

2. On Page 149 'Who needs EJBMetaData when You've got reflection' paragraph - Doesn't EJB 2.0 specs prohibit the use of reflection in a EJB?
3. In your opinion what is the best approach for implementing the Singleton design pattern using EJB and how to log important events from the EJB (The specs prohibits the use of Sockets/File IO).
Please let me know your comments.
Thanks.
AJ
[ November 24, 2003: Message edited by: Anandg Joshi ]
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy --
I'll answer two of them and leave the third for the other gurus here...
First, the best place to post errata is to write to us directly; we don't always see every post here. The second-best place to be sure the errata goes in is to post it to the O'Reilly site, on the page for this book.
Thank-you very much for giving us the feedback! This is the only way we have of finding out about the things we missed during review... and we really appreciate it.
The UML one we have to figure out. In the beginning of the book we talk about the fact that we aren't using *real* UML, but are using a simplified *fake* UML-like diagram. But that's mainly so that we can represent the args and return values in a Java format rather than a UML format. But the arrow heads... that IS a problem. And our only excuse is that our software for producing the book doesn't actually *do* arrowheads that are outlines. We're going to try to come up with a better solution, though. If we used UML diagramming tools instead of the draw tools in our book software, it would take us 10 times longer to incorporate them into the book, and change them, etc. But I think it's confusing the way it is now, at least for some people, so we'll work on this for the next book.
The EJB 2.0 spec doesn't prohibit *reflection*, although most people (including me in the past) believed that it did because of things in the programming restrictions section of the spec... but it *does* allow reflection, it just doesn't allow you to use reflection to get info about otherwise non-accessbile members...
So on page 495 of the spec, it says:
"The enterprise bean must not attempt to use the Reflection API to access information that the security rules of the Java programming language make unavailable."
There are also related class loader restrictions -- you can't create a class loader, obtain the current class loader, set the context class loader... etc.
I'm not going to express a design opinion on Singletons, but I'm sure someone else will! You can also post that on the other EJB (non-certification) forum. There's nothing about this on the exam.
Cheers and thanks again,
Kathy
 
Ed Tse
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started reading it this weekend and were amazed by how interesting the book is for such boring subjects. Now, I want Headfirst: Entreprise Architect, if there would ever be one. I really appreciate the walk through of the first AdvisorBean. It was so detailly written that I skimmed the pictures and I got my first bean running. I was amazed because I usually have to play around with the code if they are something new to me. For this, I spent 15 minute to copy the code, and follow the steps and I got it running. This book is worth every penny I spent.
[ November 24, 2003: Message edited by: Edward Tse ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic