I have a problem in Jboss Release 4.0.0 + Hibernate+ mysql + servlet test.
I deploy a har in jboss4, it works good.
But when I test a servlet , which use HibernateContext.getSession(..) to get the session, i get an error.
I traced into the jboss-hibernate.jar and found in function HibernateContext.prepareSession():
...
try
{
context = new InitialContext();
TransactionManager tm = (TransactionManager) context.lookup("java:/TransactionManager");
tm.getTransaction().registerSynchronization( new TransactionSynch(name, session) ); //##got error here
}
......
in servlet , code like :
Session session = HibernateContext.getSession("java:/hibernae/SessionFactory");
Did i miss something ?
In Jboss 4.0 , no filter needed, is it right?
|