users@glassfish.java.net

Internal processes in EJB

From: <glassfish_at_javadesktop.org>
Date: Fri, 14 Nov 2008 14:47:52 PST

Hello,

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)?

Best regards,
Roman
[Message sent by forum member 'rpolozov' (rpolozov)]

http://forums.java.net/jive/thread.jspa?messageID=316871