Hi everybody,
I am facing a strange Hibernate behavior, I think due to session timeout.
I have to insert a lot of data into the database. The insertion works for the first entries, but a a certain point I get an
org.hibernate.SessionException: Session is closed! exception.
My insert method works in the following way:
I get a session from a sessionFactory I created following a tutorial found in the internet
I create a transaction and I insert all the data using that transaction (This is the point where I get the exception)
I commit the transaction when the insertion is over
Unfortunately that works for the insertion of a small number of items, but it doesn't scale up and i get the mentioned exception.
Am I doing something wrong or it is just a matter of some misconfigured parameter?