Short answer: Use the timer service in JBoss

Long answer:
Polling is not an ideal solution usually, but sometimes it is the only
solution.
A better solution is to use messaging if you can, as then your app will
only run when it needs to.

However in the draft EJB 2.1 spec, Sun have added a new timer feature
which should do exactly what you need.  
The advantage over the current JBoss method is that it will be part of
the spec, so will port to other containers supporting 2.1.

As JBoss already has a timer service, I expect it will be one of the
first to implement this new feature 

On Thu, 2002-09-19 at 22:30, David McKnight wrote:
> I have an application that polls a db table (legacy application) for data every few 
>seconds. The data in this table will never get updated by beans, only by other 
>tables, triggers, VB clients, etc. The app I have now runs as a daemon, when it 
>starts up it initializes a few things then does it's first select from the table, 
>waits a few seconds and repeats. My question is, can something like this be done in 
>an ejb? Session or entity, preferably session since no data will be kept once it has 
>been processed. It seems that no methods in a session bean get called when deployed 
>by jboss - is there some parameter in jboss to set that would create at least one 
>instance (and I only want one)? Thanks in advance,
> David

-- 
Peter Beck BEng (hons)  - Managing Director, Electrostrata Ltd.
http://www.electrostrata.com  --+-+-+-+--  Experts in e-business and
e-commerce



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to