Since we are opening a new session instead of
sessionFactory.getCurrentSession(), will it work with JTA?
I understand that we are not supposed to use same session as the one
that triggers the event/interceptor method.
In a different context, I saw that the following provides a new
session with the same connection.
Session newSession = sessionFactory.openSession(oldSession.connection
());
If we use the above, will it work with JTA? |