| 
					
						 hi,
 
 guten tag.
 
 i am a java intermediate programmer.
 i have a bit of Hibernate code , i am wondering how people call Transaction.rollback(). i tried to do the same, Java class will not compile.
 
 code is:
 
 Session s;
 Transaction t;
 try
 {
     get session; //using HibernateUtil class
     start transaction;
     add to table via bean
     etc.. etc.. 
     transaction.commit();
 }
 catch (Exception e)
 {
     //here i want to call transaction.rollback
     t.rollback();
     //java compiler says : Transaction object (t) may not have been
    //initialized.
 }
 
 any tips are welcome.
 
 danke.
 
 iyyappan 
					
  
						
					 |