I wrote a simple Hibernate program, and it seems to work fine, the data is loaded into the database, a table is created. However, the program does not exit after calling commit ().
Here is the code snippet I'm using:
SessionFactory sessionFactory= new Configuration().configure().buildSessionFactory();
Session session = sessionFactory.openSession();
session.beginTransaction();
session.save(model);
session.getTransaction().commit();
I use MySQL as a DB for this, running the program in eclipse.
Please imagine what might be wrong here.
Thanks vipin
source
share