Java EE 6,5,7 | X-45454545 X-4545 X- 20045 X- 20045 X- 20045 X- 20045 X- 20045 X- [英] Java EE 6, 5, 7 | List of managed beans or classes: EJBs , JSF beans and ..?

查看:278
本文介绍了Java EE 6,5,7 | X-45454545 X-4545 X- 20045 X- 20045 X- 20045 X- 20045 X- 20045 X-的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以有人将目前的管理Bean列表或Java EE 5,6,7中的类列出?
除了EJB和JSF管理的bean,是否是其他类?

could someone one the current list of managed Beans or classes in Java EE 5,6,7? apart from EJBs and JSF managed beans, are they other classes ?

在EJB 3 in Action中的第5章(学习高级EJB概念)提到:

In the book " EJB 3 in Action", at chapter 5 (learning advanced EJB concepts) it got mentioned that:


只有托管类才支持DI,并且您不能使用
注入助手或实用程序类。

"DI is supported only in the managed classes and that you cannot use injection in helper or utility classes."

这就是为什么我想知道什么是一般支持的托管bean依赖注入。

That's why I wanted to know what are the managed beans that can in general support Dependency injection.

-please不要忘记提及在线参考和文档,如果有的话 -
提前感谢。

-please don't forget to mention online references and doc, if any - thanks in advance.

推荐答案

截至EE 6:


    < (EJB 3.1,第2.8节与托管Bean规范的关系)
  • CDI(JSR-299,第1.2.3节与受管Bean的关系)
  • li>
  • JSF(Managed Bean 1.0,MB.1.2节)

  • EJB (EJB 3.1, section 2.8 - "Relationship to to Managed Bean Specification")
  • CDI (JSR-299, section 1.2.3 - "Relationship to managed beans")
  • JSF (Managed Beans 1.0, section MB.1.2)

由于规格预计将基于托管Bean规范的顶部,平台规范不提供全面的列表,因此您必须检查EE 6中包含的每个规范。我的JSF证据是最弱的,因为最新的JSF规范没有明确说明它构建在托管bean规范的顶部。但是,托管bean规范本身表示它是作为JSF的一般化。

Since specifications are expected to build on top of the managed beans specification, the platform specification does not provide a comprehensive list, so you would have to review each specification included in EE 6. My evidence for JSF is the weakest, since the latest JSF specification does not explicitly state that it builds on top of the managed beans specification. However, the managed beans specification itself states that it is intended as a generalization of JSF.

这就是说EE 6平台规范中的表EE.5-1包含支持注入,PostConstruct和PreDestroy的组件类列表。这个列表比知道明确的托管bean的组件技术列表更有用。

That said, table EE.5-1 in the EE 6 platform specification contains the list of component classes supporting injection, PostConstruct, and PreDestroy. This list is arguably more useful than knowing which a list of component technologies that are explicitly "managed beans".


  • Servlet(servlet,servlet过滤器,事件监听器)

  • JSP(标签处理程序,标签库事件监听器)

  • JSF(作用域管理bean)

  • JAX-WS(服务端点,处理程序)

  • EJB(bean,拦截器)

  • 受管Bean / li>
  • CDI(CDI风格的托管bean(几乎任何类别,具有beans.xml的档案),装饰器)

  • Java EE平台静态)[应用程序客户端],登录回调处理程序)

  • Servlet (servlets, servlet filters, event listeners)
  • JSP (tag handlers, tag library event listeners)
  • JSF (scoped managed beans)
  • JAX-WS (service endpoints, handlers)
  • EJB (beans, interceptors)
  • Managed Beans [from the managed beans specification]
  • CDI (CDI-style managed beans [almost any class in an archive with beans.xml], decorators)
  • Java EE platform (main class (static) [application client], login callback handler)

这篇关于Java EE 6,5,7 | X-45454545 X-4545 X- 20045 X- 20045 X- 20045 X- 20045 X- 20045 X-的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆