On Tuesday 20 September 2005 20:56, Allistair Crossley wrote:
> You'll almost likely find that the reload via Ant does not free up all
> resources and so each time you perform a reload you'll be leaking some
> memory resulting in OOME after a week.
>
> 3 things to do;
>
> Get a profiler to see where you may be losing memory.

I will do this,

> Ensure no resource/references are held onto, dispose references correctly
how do I know Resource still in memory, usually in my servlet I always close 
my database connection, 

usually I use String to collect output first and out.print() those String
example :
String a="";
a+="Test 1";
a+="Test 2";
//.... very long , and almost 1 page 

out.println(a);

can this cause out of memory problem ?

I though there is Garbage Collector, as usually in Java Native Program ? 
if Garbage Collector is not working, how do I free up Resource in servlet ?


> Hard restart Tomcat when OOME occur.

if ant reload, cause the problem, 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to