deltaspike由核心模块和一些可选的模块为应用程序提供额外的企业功能。
作为一个CDI的延伸,deltaspike必须使用与CDI实现连接和支持JBoss weld和openwebbeans。Apache deltaspike已经在一系列的应用服务器和容器应用,利用这些CDI实现测试,如Apache tomee,JBoss AS,wildfly,Oracle GlassFish,和Jetty。
除了便携式CDI扩展模块,deltaspike提供了大量的例子来说明如何使用和获得最大的从这一技术。
DeltaSpike特点
Java EE 7 without Java EE 7!
- 1.非EJB的事务支持:使用ds的事务拦截器在javaEE7中使用@Transactional提供事务支持.
- 2.可Inject的servlet objects:在Java EE 6/CDI 1.0环境下允许开发者在Servlet中Inject cdi bean.
- 3.资源注入[Injectable resources]:使用cdi+ds,可以很容易的获取Configuration, resource bundles相关的信息.
- 4.@Exclude annotation: it is possible to annotate beans which should be ignored by CDI even if they are in a CDI enabled archive on Java EE 6/CDI 1.0 environment where you cais not use @Vetoed or a veto based on ProjectStages or expressions is needed.
- 5.调度的任务:在一个非Java EE 7环境下异步过程。
- 6.Bean验证集成:允许注入CDI Bean和EJB约束验证。
- 7.BeanProvider: Access the BeanManager and CDI beans even in non managed classes like JPA-2.0 EntityListeners or Spring Beans.
JSF改进
- Multi-window handling: Allows to manage logical windows for batches,… or in case of JSF it offers proper separation of browser-tabs.
- Type-safe view-config: It allows to bind meta-data (e.g. for security) to views with a type-safe, but flexible approach. It provides a more solid navigation in case of JSF and helps a lot in the maintenance phase.
- View-Controller: Based on type-safe view-configs view-controller annotations provide a type-safe alternative to standard-tags.
- Injection on Converters and Validators: Allows to inject CDI beans and EJB in to JSF Converters and Validators.
- JSF event broadcasting to CDI: Allows CDI to be notified about JSF events
生产力的提高
- 安全的注解:构建一个强壮,非侵入式的安全的解决方法.[没看出来哪里不侵入了.......]
- New CDI scopes: TransactionScoped, WindowScoped, ViewScoped, ViewAccess scope, Grouped conversion scope
- Container Control and Test Control: Java SE with CDI, all with a unifying API. Start, stop, add classes to a running CDI container.
- Data Module: 一个开箱即用的实体框架解决方案完成对容器或应用程序管理的持久性上下文的支持,以及JDBC。
- Decoupled Exception handling:允许做一个异常处理类,类似于CDI Overservers.
- JMX integration: Any CDI bean can be exposed via JMX easily with one annotation.
- 类型安全的i18n消息:本地化消息很容易使用,仅一个接口和一个资源包。
- 类型安全ProjectStages:在JSF ProjectStages相比,DeltaSpike提供类型安全的,但仍可扩展方法,可以用于基于CDI的应用程序。
Configure DeltaSpike in Your Projects
http://deltaspike.apache.org/documentation/configure.html
Enable CDI For Your Java Environment
http://deltaspike.apache.org/documentation/cdiimp.html
deltaspike模块的概述
http://deltaspike.apache.org/documentation/modules.html
除了core外,其他全部是可选的.