Hello Hibernate Users,
I have code something similar to this:
Code:
// BMT idiom with getCurrentSession()
try {
UserTransaction tx = (UserTransaction)new InitialContext()
.lookup("java:comp/UserTransaction");
tx.begin();
// Do some work on Session bound to transaction
factory.getCurrentSession().load(...);
factory.getCurrentSession().persist(...);
tx.commit();
}
catch (RuntimeException e) {
tx.rollback();
throw e; // or display error message
}
Basically all I want to do is test that it is working properly. I dont need to write a Junit test, just a manual method of testing this will be fine.
If anyone could provide help on the matter it would be much appreciated.
Outlaw