I did not know that JMX provided the Timer (and I am on the expert group?
;-).

It does make some sense since this is equivalent to the "cron and at"
commands of Unix that are always used in administration.  We are continuing
our Unix on the Web crusade with J2EE.

It seems to me that going to the management layers of JMX to provide the
timed events to the logic beans is a bit un-natural for a programmer.  Maybe
not it *is* administration of your application.  A "workflow" engine is
needed in jboss/j2ee.  Event beans still look to me like a different kind of
EJB.


marc




> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Rickard �berg
> Sent: Saturday, June 17, 2000 10:44 PM
> To: jBoss
> Subject: Re: [jBoss-User] Timed execution
>
>
> Hi!
>
> Phan Anh Tran wrote:
> > I have a BusinessSession with a number of methods.  I want to delay the
> > execution of a couple of methods.  Ie. say I do not want the
> client to execute
> > methods A,B,C more than once every 5 minutes.  That is, execute
> A, wait 5
> > minutes, execute B, wait 5 minutes, execute C.
> >
> > My initial thought is for each invocation of A, B, and C, I
> would just queue the
> > requests, and I would keep a timer thread that wakes up every 5
> minutes to check
> > the queue for requests, dequeue the request, if any, and carry it out.
> >
> > Does this violate any SessionBean specs?  I am not quite sure
> that by keeping a
> > separate thread, I would violate the single thread restriction
> (?) of an EJB.
>
> Use JMX. There is already a standard MBean for this type of things:
> javax.management.timer.Timer. Register one in the server by adding it to
> jboss.conf, and make your own MBean which adds jobs to it at your
> discretion. Not very difficult to do, and follows standards (JMX in this
> case).
>
> /Rickard
>
> --
> Rickard �berg
>
> @home: +46 13 177937
> Email: [EMAIL PROTECTED]
> http://www.telkel.com
> http://www.jboss.org
> http://www.dreambean.com
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Problems?:           [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to