To evalutate the EJB technology, we are porting a little test
application to EJB. In short, this application allows a client to store
certain processings in a repository. The repository should then execute
these processings at certain moments in the future, independently of the
client.
In the original repository, we have something like a priority queue of
processings, ordered by the time each processing is due. The repository
(a)
accepts new processings which it puts into its priority queue and (b)
sleeps
until the next processing is due, wakes up and executes the processing.
With
existing entity or session beans, (b) seems to be not possible: AFAIK
they
do not allow "daemon functionality".
As I estimate that such daemon requirements are rather common, wouldn't
it be interesting to add some kind of "daemon beans" in addition to the
two existing bean types? Such a daemon bean could be started through
some
starting method. From the starting method returns the 'run()' method of
the
bean could be run. In the 'run()' method, the bean could then say
something like
'wait (numberOfMS)' and the bean container would suspend the execution
for 'numberOfMS' milliseconds. (I could imagine some more features here,
but I
wanted to keep it simple for the discussion).
Would such "daemon beans" cause problems for the container builders? But
isn't EJB without such (or an equivalent) "daemon functionality" rather
limited?
What do you think?
Thank you.
Philipp
--
Philipp Oser, Ubilab Research Staff Member, email: [EMAIL PROTECTED]
UBS AG, P.O. Box, CH-8098 Zurich, Switzerland, phone: +41 (0)1/ 234 40
77
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".