-->
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.  [ 7 posts ] 
Author Message
 Post subject: Entity Listeners in Hibernate Annotations?
PostPosted: Mon Jan 08, 2007 10:29 am 
Newbie

Joined: Mon Jan 08, 2007 10:25 am
Posts: 4
Are Entity listeners only supported in Hibernate EntityManager, or are they supported in Hibernate Annotations as well? I can't get them working under Hibernate Annotations 3.2ga


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 1:39 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
only in HEM

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 09, 2007 3:41 am 
Newbie

Joined: Mon Jan 08, 2007 10:25 am
Posts: 4
emmanuel wrote:
only in HEM


Too bad, I think they are something that Hibernate should incorporate from the spec (and not the other way around)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 10:18 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
But this feature is build on the hibernate event listener model which is much more flexible :-)
It should be possible to change the event listener to achieve the same feature (the code in hem does that and some other event changes, but it doesn't bootstrap in the eventlistener.initialize today (even if this should be possible)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 4:33 am 
Newbie

Joined: Mon Jan 08, 2007 10:25 am
Posts: 4
emmanuel wrote:
But this feature is build on the hibernate event listener model which is much more flexible :-)


But it also more of a vendor lock-in. I want to use my domain object across different persistence providers. (The reason why I'm not using JPA is that I can't get it to work with CMT under EJB 2.1. Spring doesn't provide a way to hook the into the transaction for jpa the way it does for hibernate)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 7:58 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
ahem, so you use a proprietary API/configuration namely Interface21 Spring, to avoid having to use a standard API, namely JavaEE ;-)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 15, 2007 4:50 am 
Newbie

Joined: Mon Jan 08, 2007 10:25 am
Posts: 4
emmanuel wrote:
ahem, so you use a proprietary API/configuration namely Interface21 Spring, to avoid having to use a standard API, namely JavaEE ;-)


Well, kind of ;-) Spring is used throughout the architecture. Having chosen one vendor lock-in doesn't open the door for the rest of the proprietary APIs, on the contrary.

It's not used as a alternative to JavaEE, it's used as to compliment JavaEE, and it's used as in a non-intrusive way.

The fact that my architecture uses Spring doesn't change the fact that JPA-style EntityListeners would be a nice feature in Hibernate Annotations. I would of course use Hibernate EntityManager (or another JPA PP) had it been possible in combination with EJB 2.1.


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