I'm executing a command on every request of a process, and this process might or might NOT access any hibernate functions. At the very end of this process i'm running...
Code:
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.getTransaction().commit();
Does the
getCurrentSession() and the getTransaction() in the statements actualy create new objects if none exist? As I said above, the process might or might NOT use any Hibernate functions, and if it doesn't then I dont want to create anything new. If it does of course, then i want to close everything.
I hope I'm being clear!
Thanks,
Eurig