Out of Memory in heap-need solutions
Dear friends,
i am developing a real time web site, where i have to give results for students.
Student hit ratio will be very high.I am using simple MVC pattern
where html file request to a servlet and that servlet create a smiple java object,
that java object will connect to the database and retrieve the data and give to that same servlet, this servlet Requestdispatch to a jsp page.
Above thing is my scenario.
As i described, the simple java class(which connect to database) is not delete the object which is used by it.I think this lead to Out of memory in heap.
How i can delete the object once i used it ?
If i even do it, whether GC will collect the unused object.
Otherwise, may i write connection code in servlet itself(which get request from the html file) ?
please give guidelines.
reply will be highly appreciated.
thax in adv.
I don't other way Kindly help me
I know only this way, can you please give some other way of code.