Hibernate Books

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
 Post subject: errata - continued
PostPosted: Tue Nov 16, 2004 10:25 am 
Newbie

Joined: Mon Nov 15, 2004 1:37 pm
Posts: 2
Hi Christian,

I should have been more patient while reading your book. Then I would have been able to only post one errata topic. Sorry for that.

Here is my new list:

page 291 is missing a "=" assignment operator for the definition of the hibernate.cache.use_query property (this one is realy a minor one ;-)

page 305/307/310
The various execute-method code-snippets all lack of the code to rollback the transaction by calling HibernateUtil.rollbackTransaction(). Since your first version of the (to be improved) servlet in listing 8.2 (page 298/299) did do a rollback in case of a catched exception you should really have the rollback code in your elaborated versions, too (just to be consistent).

page 314
In the last third of the page you claim that the EJB spec lacks of a notion of interceptors. Even that you do mention the feature of JBoss server-side interceptors I'm missing here a word about AOP. That's not really an error, but mentioning that one could achive a portable way of intercepting EJB instance invocations by using a AOP framework (like e.g. JBossAOP) would definitly be a helpful remark from my point of view.

Again, the book is a great reading! Thanks for the hard work putting all that detailed information together.

Bye,
Dirk


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 4:03 pm 
Newbie

Joined: Wed Nov 17, 2004 3:56 pm
Posts: 5
244, last paragraph: Replace "setMaxResult(1)" with "setMaxResults(1)"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 4:08 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Quote:
page 291 is missing a "=" assignment operator for the definition of the hibernate.cache.use_query property (this one is realy a minor one ;-)


Both work.

Quote:
page 305/307/310
The various execute-method code-snippets all lack of the code to rollback the transaction by calling HibernateUtil.rollbackTransaction(). Since your first version of the (to be improved) servlet in listing 8.2 (page 298/299) did do a rollback in case of a catched exception you should really have the rollback code in your elaborated versions, too (just to be consistent).


Major change, not for errata. I'll keep it in mind if there is a next edition.

Quote:
page 314
In the last third of the page you claim that the EJB spec lacks of a notion of interceptors. Even that you do mention the feature of JBoss server-side interceptors I'm missing here a word about AOP. That's not really an error, but mentioning that one could achive a portable way of intercepting EJB instance invocations by using a AOP framework (like e.g. JBossAOP) would definitly be a helpful remark from my point of view.


Good idea.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 18, 2004 2:15 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
on page 207 method "getPropertyValue" there's is a " () " to much ...
Code:
return MonetaryAmount.getValue()();


gtx
curio


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 19, 2004 5:57 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
on page 207 (sorry for two posts but haven't seen it) method "getPropertyValue":
Code:
MonetaryAmount MonetaryAmount = (MonetaryAmount)component;

must be replaced with
Code:
MonetaryAmount monetaryAmount = (MonetaryAmount)component;


gtx
curio


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 19, 2004 5:59 am 
Expert
Expert

Joined: Tue Oct 05, 2004 9:45 am
Posts: 263
waah sorry! (missed the 'preview'-button :( :) )... same page same method ...
all 'MonetaryAmount' variables should be changed to 'monetaryAmount' ...

gtx
curio


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 19, 2004 6:04 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Uh, that was even present in CaveatEmptor source (most of the stuff from the book has actually been compiled and tested). Fixed.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 23, 2004 1:27 pm 
Newbie

Joined: Wed Nov 17, 2004 3:56 pm
Posts: 5
268, last code block
Code:
User user = ...
...
q.setEntity("user", givenUser);


s/givenUser/user/ || s/user/givenUser/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 02, 2004 5:52 pm 
Newbie

Joined: Wed Nov 17, 2004 3:56 pm
Posts: 5
221, last paragraph "there can be only one user per address:" should read "there can be only one address per user:"

You're not making user unique, you're setting the address unique per user.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 06, 2004 6:40 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Thanks


Top
 Profile  
 
 Post subject: Serializable must be "implemented", not "exte
PostPosted: Wed Dec 08, 2004 12:03 pm 
Newbie

Joined: Wed Dec 08, 2004 11:49 am
Posts: 1
In section 8.3.1 (page 334 in my book, but I'm not sure which printing it is), there's a code snippet that begins with this line:

public class UserId extends Serializable

Since Serializable is an interface, that line should read:

public class UserId implements Serializable

Thanks for a great book, and please let me know if I'm missing something here; it wouldn't be the first time.

_________________
Andy Cohen
acohen5212@yahoo.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.