-->
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: interceptor / temporary entityManger
PostPosted: Wed May 06, 2009 5:31 am 
Beginner
Beginner

Joined: Tue Nov 06, 2007 5:13 am
Posts: 28
In my interceptor I need to persist some entities: thus I need a new hibernate session that shares the same JDBC connection with the original session - that's ok and this works in my tests.

Now I'd like to reuse the methods of my existing DAOs, which all use an entity-manager.

Is there a way to wrap the temporary session in an entity-manager?
Or somehow create a temporary entity-manager that shares the same JDBC-connection as the original entity-manager?

I thought about extending EntityManagerImpl and overriding getRawSession() - but this doesn't work...


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.