By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,798 Members | 1,336 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,798 IT Pros & Developers. It's quick & easy.

Schedule events with MDB starting TimerTasks

P: n/a
Hi,

I will first expose what I need to do, and then how I did it so far:
I have a simple java application that is monitoring the status of
several services, the configuration for this monitoring is stored in a
database and can be changed interactively with a J2EE web module.
Until now the monitoring has been called from outside of the
application with perl, I would like to integrate all in a J2EE
application. I know in J2EE 1.4 EJB will be able to use TimerObject
but using 1.3 is a must.
My solution so far is:
I have an MDB that starts X TimerTasks that themselves perform the
monitoring. When receiving a message the MDB re-reads the
configuration from the DB and stops the task by a simple Latch class
implementation, and restarts X or Y new Tasks.
In order to start the monitoring at server startup I am using a
servlet that is loaded on startup and that puts a message in the queue
the MDB reads.
Can anyone with such experience, validate my way of doing this, or
tear it down to pieces and show me the right way of doing this?

Thanks a lot
Yvan
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Yes, it is possible.

- perry

Yvan wrote:
Hi,

I will first expose what I need to do, and then how I did it so far:
I have a simple java application that is monitoring the status of
several services, the configuration for this monitoring is stored in a
database and can be changed interactively with a J2EE web module.
Until now the monitoring has been called from outside of the
application with perl, I would like to integrate all in a J2EE
application. I know in J2EE 1.4 EJB will be able to use TimerObject
but using 1.3 is a must.
My solution so far is:
I have an MDB that starts X TimerTasks that themselves perform the
monitoring. When receiving a message the MDB re-reads the
configuration from the DB and stops the task by a simple Latch class
implementation, and restarts X or Y new Tasks.
In order to start the monitoring at server startup I am using a
servlet that is loaded on startup and that puts a message in the queue
the MDB reads.
Can anyone with such experience, validate my way of doing this, or
tear it down to pieces and show me the right way of doing this?

Thanks a lot
Yvan


Jul 17 '05 #2

P: n/a
> Yes, it is possible.

- perry


It's possible, but is it a good idea, or am I going to give myself a
bad name by doing things like that?
Is there any official and recommended way of doing this without buying
3rd party software?
Thanks
Yvan
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.