This content has been marked as final. Show 5 replies
What exactly do you want to thread? The fetching of XML data for each IP? But why would you want to do that, just run through them sequentially and keep your life easy.
In any case you could use JMS here (timer fires off a JMS message, an MDB actually handles the business logic), which also gives you quite a bit of configuration flexibility.
r035198x wrote:Agreed, although JMS gives more configurable powers to queue and throttle.
Last time I had suggested using EJB 3.1 for this. There is really no reason to use EJB 3 for new projects these days. You get async invocations with it so you won't need to use JMS to simulate asynchronous executions anymore.
Thanks a lot for your replys.
yes I want to fetch the XML files from each device IP. There could be a lot (400-1000) sensor nodes to fetch the XML file from. That's why I thought to use threads to fetch it simultanuous.
The XML data fields have to be read out and put into DB.
It is supposed to run as a background service (like a Daemon) just on the server. There is no need for client interaction. so a timer bean would trigger the async invocation in 10s intervalls.
I checked "async invocations" Oracle tutorial. I think it is that what I am looking for the background service business logic.