javaee / javaee-spec

Java EE Platform Specification
https://javaee.github.io/javaee-spec
Other
389 stars 69 forks source link

Standardize Embedded Containers/Testing #27

Open glassfishrobot opened 11 years ago

glassfishrobot commented 11 years ago

Standardizing the EJB Lite Embedded Container in Java EE 6 was a very important first step in improving testability. As the various currently server-specific Java EE embedded containers and projects like Arquillian demonstrate, there is a lot of scope for further standardization in this space to improve testability. I suggest the following in roughly priority order:

1. Standardize a required embedded container for both the full and web profiles. 2. In addition to the current EJB Lite container, also standardize an embedded container for the full EJB container. 3. Standardize an embedded container for CDI (I am aware that this is already in the works). 4. Standardize a container that includes everything but the web/presentation/interface tier APIs (Servlet, JSF, WebSocket, JAX-RS, etc). This is very important in having a container that is capable of integration testing the application services layer, business/domain layer and persistence/DAO layer but is much lighter weight than a full container.

Both GlassFish and Jetty (acknowledging that Jetty is not a compatible container) Embedded are good examples of embedded container APIs. I suggest the following as embedded container features, in roughly priority order.

1. Managing the container life-cycle. 2. The ability to deploy and undeploy applications. 3. Deploy from the class-path, file systems (deflated/scattered or one deployable artifact) or programmatically (Shrinkwrap is worth looking at as an example of programmatically defining deployment artifacts). 4. The ability to configure the container (e.g. port settings).

Do let me know if anything needs to be explained further - I am happy to help.

Please note that these are purely my personal views and certainly not of Oracle's as a company.

glassfishrobot commented 11 years ago

Reported by reza_rahman

glassfishrobot commented 11 years ago

agoncal said: That's something I would like to see in Java EE 8. Testing Java EE has always been difficult. It made a very important move with the Embedded container API and helped framworks like Arquilliant. Now it's time to go further.

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAVAEE_SPEC-27