开发者

Is concurrent code in JMX services allowed?

The EJB 3.1 Spec. states:

The enterprise bean must not attempt to manage threads.

The JBoss EJB 3 Extensions Referen开发者_如何学Cce states:

[JMX services] are singleton beans...

So I reason:

  1. Using a multithreaded 3rd-party lib in a JMX Service is not conform to the Spec.
  2. A JMX service is a wrapper for a EJB 3.1 Singleton Bean with additional management capabilities provided through the JMX console.

Am I right?


JBoss AS will (currently!) not prevent the use of threads in an EJB.

A JMX service (MBean) is not related to EJB; threads are allowed in JMX.

@Service beans are implemented with a JMX wrapper. They are a proprietary extension to EJBs and so do not conform to the EJB spec. They are kind of a hybrid between EJBs and JMX MBeans.

@Service beans are not related to EJB 3.1 Singleton Beans. Although being similar, they were around before EJB 3.1 existed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜