« Back to home

One of the most common requests we hear from Enterprise JavaBeans developers is for improved unit/integration testing support.

EJB 3.1 Specification introduced the EJB 3.1 Embeddable API for executing EJB components within a Java SE environment.

Unlike traditional Java EE server-based execution, embeddable usage allows client code and its corresponding enterprise beans to run within the same JVM and class loader. This provides better support for testing, offline processing (e.g. batch), and the use of the EJB programming model in desktop applications. […] The embeddable EJB container provides a managed environment with support for the same basic services that exist within a Java EE runtime: injection, access to a component environment, container-managed transactions, etc. In general, enterprise bean components are unaware of the kind of managed environment in which they are running. This allows maximum reusability of enterprise components across a wide range of testing and deployment scenarios without significant rework.

Read more »

Inspired by the Spring with Stripes integration I decided to make one for Java EE: Stripes Injection Enricher. Stripes Injection Enricher enriches Stripes Framework objects by satisfying injection points specified declaratively using annotations. There are three injection-based enrichers provided by Stripes Injection Enricher out of the box: @Resource - Java EE resource injections @EJB - EJB session bean reference injections @Inject - CDI injections The source code is available on GitHub at StripesFramework/stripes-injection-enricher.…

Read more »