-->
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.  [ 3 posts ] 
Author Message
 Post subject: Use in DAO in callback such PreRemove
PostPosted: Mon Jan 14, 2008 7:05 pm 
Beginner
Beginner

Joined: Thu Nov 02, 2006 2:23 pm
Posts: 33
Hibernate - 3.3GA
working with Jboss 4.2 , ejb3 (JPA)

is it ok in pre-remove to use my DAO to delete another object?
I understood that there is a problem to use in entity manager in the event listner call backs.

How can i overcome this issue?

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 23, 2008 10:25 pm 
Newbie

Joined: Wed Jan 23, 2008 9:49 pm
Posts: 4
i'm sorry to tell u it's impossible to use session/entitymanager in jpa callback


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 23, 2008 11:03 pm 
Newbie

Joined: Wed Jan 23, 2008 9:49 pm
Posts: 4
you can use Hibernate Interceptor which can use session.

add this into persistence.xml

<properties>
<property name="hibernate.ejb.interceptor" value="net.jeffrey.EntityInterceptor"/>
</properties>


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