-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to trigger entity's callback method?
PostPosted: Mon Sep 20, 2010 9:23 pm 
Newbie

Joined: Mon Sep 20, 2010 9:19 pm
Posts: 1
In my project(JPA2.0,EclipseLink,mysql),I have a entity listener. For example,when entity updated, the method with annotation '@postupdate' will be triggered. This works well.

But sometimes,user updated the entity(getEntityManager().merge), JPA provider will check whether entity's property changed. If there is no change in entity, JPA provider will not update this entity.(This is cache mechanism,I think). So the the method marked '@postupdate' will not be triggered. But I need the '@postupdate' method triggered at this situation. How to do it?


Top
 Profile  
 
 Post subject: Re: How to trigger entity's callback method?
PostPosted: Wed Sep 22, 2010 10:15 am 
Newbie

Joined: Wed Sep 22, 2010 10:00 am
Posts: 5
When keep the same EntityManager running merge (), remove (), and find () or when the EJB QL query, the life-cycle events are run with a predefined set to run. Sometimes very entity bean class availability has to be notified of these events to occur.

_________________
live dealer casino


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.