-->
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.  [ 1 post ] 
Author Message
 Post subject: Events triggered from cascaded/relation operations
PostPosted: Mon Dec 05, 2005 8:35 pm 
Newbie

Joined: Mon Dec 05, 2005 7:40 pm
Posts: 2
Hibernate version: 3.0.5

I've checked through the reference documentation and looked briefly through the event.* api looking for something suitable but haven't been successful so far.

I'm looking for an ability to capture relationship events between entities (basically adds & removes).

ie)
Project --> Sample

If I add Sample.Y to Project.X, it would be nice to have an event triggered that would give me information from the *..1 side (ie. ADD_REL from Sample.Y to Project.X).

This information is used to construct a JMS message that is sent to a thick client listener. We're re-architecting an existing ejb-based system that solves this problem by inserting explicit message creation code in the cmr relationship setters.

Looking at the api, it's appears trivial to get notifications on a per-entity level (ie. this sample has been added, this entity has been removed). It would be a great help to know where/or what prompted the add/remove.

Is this possible to do using the current hibernate api with a custom event listener/interceptor and/or an AOP piece?


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

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.