-
1. Re: EJB solution for doing something small 10 times per second
welle Nov 19, 2013 3:09 AM (in response to aqtwrdnr)Hi
From what I remember the EJB3 scheduling can only be configured on seconds and not ms (but I can be wrong so look it up in the schema or spec).
What is the purpose of sending these "timed" messages to an asynchronous service like JMS (that will NOT consume them respecting the "timing")?
-
2. Re: EJB solution for doing something small 10 times per second
aqtwrdnr Nov 19, 2013 3:52 AM (in response to welle)Hello welle, thanks for your reply.
The EJB 3.1 specs indeed say:
While timer durations are expressed in millisecond units, this is because the millisecond is the
unit of time granularity used by the APIs of the Java SE platform. It is expected that most timed
events will correspond to hours, days, or longer periods of time.
The purpose is polling a particular URL for changes that occur. Since the duration of internet I/O operations are unpredictable, we decouple the execution of the HTTP GET requests from the process that creates the requests 10 times per second. A set of Message-Driven Bean's handle the execution of the actual requests and check for changes.
Any ideas for improvement?
Thanks in advance!
-
3. Re: EJB solution for doing something small 10 times per second
nickarls Nov 19, 2013 5:05 AM (in response to aqtwrdnr)It appears quite a complicated solution just to poll a web site for changes(?)
-
4. Re: EJB solution for doing something small 10 times per second
rhusar Nov 19, 2013 5:12 AM (in response to aqtwrdnr)Since the duration of internet I/O operations are unpredictable, we decouple the execution of the HTTP GET requests from the process that creates the requests 10 times per second.
I wonder if this is even a good approach. Are you using all the data or only the latest?
-
5. Re: EJB solution for doing something small 10 times per second
aqtwrdnr Nov 19, 2013 5:24 AM (in response to rhusar)Thanks for all your replies.
nickarls: Maybe you are right. What would be your approach?
rhusar: What do you mean by "Are you using all the data or only the latest?" The response of each request is checked and if it satisfies certain conditions, we take some action. So, all responses are used for at least some part (to check for changes) and the 'last' one is used entirely (parsed, etc).