Internal processes in EJB
I am new in JEE technology and cannot find answer to my question.
I want to create JEE application, what should not only process requests from web-client,
but should also periodically request some special hardware and update database, based on the answers. So, could you give some recommendations regarding possible architecture.
Is it Ok to create threads from Session Beans?
Is it possible to create new threads from Session Beans?
Is it Ok to open from Session Beans server sockets to listen incoming requests?
Is it possible to use EJB TimerService instead of separate threads (it read that this service is better to use for long tasks, but my tasks are very short and should be repeated every second, for example)?
If yes, is it possible to store current context of the pooling in some place (Stateful Session Bean for example)?