且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java EE 6 CDI实现之间的差异

更新时间:2022-02-02 06:51:58

主角的快速概述:


  • Weld RI(只有一个RI),版本1.0已经用完,它内置于GlassFish v3和即将推出的JBoss AS EE 6中,但也可以与其他容器(有一些限制)。

  • OpenWebBeans仍在开发中,版本1.0.0 计划于2010年4月底。

  • Caucho CanDI似乎与树脂绑在一起(我可能在这里错了,但我在他们的网站上找不到相反的明确证据,无论如何都不好。)

  • Weld is the RI (there is only one RI), version 1.0 is out, it is built into GlassFish v3 and the upcoming JBoss AS EE 6 but can also be used with other containers (with some limitations).
  • OpenWebBeans is still under development, version 1.0.0 is planned for end of April 2010.
  • Caucho CanDI seems to be tied to Resin (I may be wrong here but I couldn't find any clear proof of the contrary on their website, which is bad anyway).

所以,如果我在撰写本文时必须选择一个实现,我会选择RI(即Weld),因为它已经准备好并且可以独立使用(准备并不意味着它已被广泛使用)用过)。

So, if I had to pick one implementation at the time of writing this, I would pick the RI (i.e. Weld) because it's ready and can be used "standalone" (ready doesn't mean it has been widely used).

如果你正在寻找一些表现比较(你想比较什么?),我认为你现在不会找到这样的基准。

If you're looking for some performance comparison (what else would you like to compare?), I don't think you will find such a benchmark for now.

在任何情况下,如果您想使用CDI,只需这样做。

In any case, if you want to use CDI, just do it.