1 Reply Latest reply on Jan 27, 2005 5:32 AM by Dimitris Andreadis

    Using synchronization primitives within JMX-Beans

    Gerd Streubel Newbie

      The EJB specification forbids using synchronization primitives within an EJB (Chapter 24.1.2, page 494).

      An enterprise Bean must not use thread synchronization primitives to synchronize execution of multiple instances.

      What about the use of such primitives in scheduler JMX-Beans provided by JBoss-AS? I have a JMX-Bean implementing Schedulable and MessageListener interfaces. Two threads compete against the scheduler object via perform() and onMessage() methods. To avoid race conditions both methodes have to be synchronized.

      Do I have to expect any conlicts?