We are doing a batch program for processing the messages coming from MQ. We use Hibernate to implement the DB operations. Our expectation is to process 100,000 messages per hour. We were able to process 1000 messages in 30 seconds (which should give 120,000/Hr). But as the Messages are increasing, the performance is hindered very much. For eg.10,000 messages are taking more than 16 min.
We open the session during application startup and in a while(true) loop, we do the session.beginTransaction() and towards the end of loop we do a session.getTransaction().commit();This application needs to run 24/7 .
Is there anything like cache clearing in Hibernate or any pointers on above will be highly helpful
|