Thread:
 Bug in Interceptor implementation 
 MikhailAU   07 Nov 2005, 18:28 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: MikhailAU (07 Nov 2005, 18:28) Replies: 0, Views: 26827
Subject: Bug in Interceptor implementation
It's in onSave method. This method will be executed BEFORE the DB INSERT
occurs. So entity doesn't have an id yet. Therefore you will have
NullPointerException when try to add it to Lucene index. I think it will
be better to implement this functionality somewhere else (in
DefaultPostInsertEventListener probably?)
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]