It does break the spec, bottom line is it is going to be passivated and your
thing probably won't work,

the best thing is to build a "timer" service in the server.  It is something
that I have been looking at for a long time and never thought through.

We would need a generic way of specifying a schedule of events (punctual,
recuring, intervals, special dates  etc etc)  we would register along with a
set of instances to be called.  We would also need the way to tell the
server "here register these keys or handles with this timer event"....

In short, EJB is probably not your answer if you are looking for something
quick and dirty.  A long term solution to this "timed execution" problem is
something you might want to look at in jboss.

marc


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Phan Anh Tran
> Sent: Saturday, June 17, 2000 5:54 PM
> To: jBoss
> Subject: [jBoss-User] Timed execution
>
>
> 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.
>
> Anh
>
>
> --
> --------------------------------------------------------------
> 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