Web Beans Sneak Peek

JavaEE6まで待てばWeb Beansが使えるようになるんだよなぁ,ってそれは今から何年後?

遥か先の話とは言え,Part Iにあったこの部分(太字)には惹かれるなぁ.

While Web Beans provides a sweet spot for the integration of JSF and EJB3, the component model is much more generally useful. In particular, it supports use without either JSF or EJB3. An early question that arose was to what extent Web Beans would be limited to the EE and EJB3 environment. The unanimous decision of the group was that:

  1. Web Bean does not have to be an EJB
  2. Web Beans should be executable outside the EE environment

The first decision merely recognizes the fact that not every component needs the services that EJB provides (transaction demarcation, authorization, etc). However, Web Beans will not duplicate this functionality, so when these services are needed, the Web Bean should be written as a session bean.

The second decision allows components to be integration/unit testable outside the application server environment, and allows reuse of code in, for example, a batch process.

なんだかんだいって,EJBコンテナに依存する以上,JavaEEって使いどころが限定されんだよね.だから,LightweightコンテナとしてSpringを使いたいって気持ちも分からんでも無い.
まあ,この手の話で葛藤するのはJava屋の宿命だからなぁ.あんまりブーたれるのよそう.