It uses HibernateDAOTemplate to handle the session..Hibernate runs lot of sql statements in the beginning and traverses the whole object graph ( parent -child ) and retrieves all of the objects.. My problem is that i tried to make it lazy ..tried to set up the batch size but all things ended with exceptions ...if i make all mappings lazy then i am getting Session Closed exception ..I am seeing the call in web service at this point..and it looks like some thing is triggered outside the context..for the batch size setting .. I am getting XYZ object not found at runtime...My question is what should i do to improve the performance and what guidelines i should follow ..I don't know much about Hibernate -Spring
SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
In order to improve the performance you will have to get the lazy loading working(which is quite a task in itself, in an existing application. Merely setting lazy=true in the mapping wont always get it working). Spring provides OpenSessionInViewFilter which you can use in your application. But before doing that you might want to read some more articles about how lazy loading works in Hibernate. One of them is this. [ December 26, 2006: Message edited by: Jaikiran Pai ]
Thanks James & pai .. I will try that and will let you know if i have any issues( I am sure i will have )
Joined: Jul 12, 2004
can any one give me some good article about defining the relationship - associations for the classes/mappings. Does the Assciations make difference while loading up the whole object graph .. How to distinguish whether uni directional association is needed or Bi directional ??
subject: Hibernate With Spring - Performance Issue