-->
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: EJB3 callbacks
PostPosted: Mon Oct 03, 2005 5:03 pm 
Beginner
Beginner

Joined: Sat Sep 17, 2005 10:41 am
Posts: 49
I wanted to use the EJB3 @PrePersist/@PreUpdate callback annotations. I haven't gotten it to work (callbacks are not called), and I suspect that I have to use the EntityManager/EntityManagerFactory to get this working.

However, after poking around with the EntityManager stuff, I realized that I won't be able to use the Hibernate Criteria API. (I would like to use the Criteria API internally for my DAO classes.)

Any way around this?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 5:42 pm 
Beginner
Beginner

Joined: Sat Sep 17, 2005 10:41 am
Posts: 49
Never mind... I figured it out.

For those interested, you can cast the EntityManager as a HibernateEntityManager and call getSession on the latter to get the good ol' Hibernate Session.


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.