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...
|
|