-
1. Re: Multithreading&synch. in POJO EJB-Helper classes
starksm64 Mar 16, 2006 6:01 PM (in response to crawack)synchronization is synchronization. The restriction is all about are you interferring with the container and its management of the components. You either:
1. Never use concurrency because its scarry and disallowed by the ejb spec.
2. Use it and hope for the best.
3. Use it trying to understand how it can interact with the container and the spec mandated behaviors. At this point your a container developer interacting with a concurrent, transacted system. -
2. Re: Multithreading&synch. in POJO EJB-Helper classes
crawack Mar 17, 2006 7:04 AM (in response to crawack)Hello Scott,
thanx for the answer!
Does this mean that also the pojos resp. the ejb-helper classes resp. everything what is deployed on the AS is controlled by the container, ... and not only the ejbs itself? (We use only CMP)
Jogi
Background of my question: in our project a scheduled JMX MBean calls periodically a pojo class resp. a method of this class, which then executes a very resource-intensive long lasting job (e.g. with a lot of DB accesses via EJBs). While doing so all other jobs (e.g. DB access to the same tables) are blocked or at least extremely slowed down. We modified the pojo so that the above resource-intensive job is executeted in a single thread with normal priority (just by implementing IF Runnable etc.). The thread can only be started for one time (like a singleton), so its not multithreaded.... now it works and no more blocks take place???