Hello all,

I have a chain of stateless session beans that are being triggered by
the timer service in Geronimo.

But, even though they are being created with single expirations - they
do not seem to be getting destroyed until the entire chain finishes.

For clarity here is what I mean by chain:

Timer1 creates a timer object for Timer2 with a single expiration.
Timer2 creates a timer object for Timer3 with a single expiration.
.
.
.
TimerX creates a timer object for TimerY with a single expiration.

Each successive timer is created as the '@Timeout' method of its
'parent' is finishing with an expiration date/time one minute in the future.

Each of the timers is performing some pretty intense data cleansing
work.  So, there is a lot of memory getting allocated at each step.  So
much so that even with no other activity going on, the server often
crashes (runs out of memory or becomes unable to make new database
connections) before it is able to get to the end of the chain.

I added a 'finalize' method and a '@PreDestroy' method for each of the
timers and none of them have been called yet even though fourteen timers
have run and printed out a message to the console indicating that the
'timeout' method has gotten to the end.

Actually, I just got a heap space error and finally one of the classes
got finalized (two now) but it looks like that is probably all that will
finish 'cleanly'.

Is there a way to nudge those classes so that they finalize?

I suspect that the only reason that these to did is because of the heap
space errors.

Any hints?

Thanks,

Jay

Reply via email to