I am developing application in which beans communicates with network routers (using snmp protocol). Every 5 seconds routers has to be queried to return some information. So I developed stateful bean that holds all properties required to communicate with router, and also exposes business method sendRequest(...). The problem is: how to call this method every 5 seconds? The perfect solution would be to use stateful session bean with timer service - unfortunately it is forbidden by EJB specification. I don't want to make this developed bean stateless, because it holds some important information about current connection (router IP, port, community name, protocol and so on), so passing all those information every 5 seconds would be inconvenient (that's first), and also harm the scalability (that's second - more important). I need to have multiple instances of this bean, because many routers are queried the same time. Do I have any alternative?
Thank you in advance!
Thanks for answer Jaikiran. Unfortunately I cannot use JBoss AS6 because other parts of application has been designed to work with JBoss 5.0.0.GA and uses some non-standard features. Because of this I cannot take into consideration migration to newer application server.
Secondly I need multiple instances of this beans, because each one holds connection to another router (with all connection-related properties).
|Retrieving data ...|