private void bindSession(){
  SessionFactory sessionFactory=(SessionFactory)getBean("sessionFactory");
  Session session=sessionFactory.openSession();
  TransactionSynchronizationManager.bindResource(sessionFactory,new SessionHolder(session));
}

private void bindSession ( ) { SessionFactory sessionFactory = ( SessionFactory ) getBean ( "sessionFactory" ) ; Session session = sessionFactory . openSession ( ) ; TransactionSynchronizationManager . bindResource ( sessionFactory , new SessionHolder ( session ) ) ; }
binds a hibernate session to the current thread .
