It's all about embedded (and testing)

In his recent "Test Coverage for your Enterprise Beans" blog post Markus Eisele starts by discussing the differences between the GlassFish Embedded API, the standard EJB 3.1 API, and the Maven GlassFish Plugin. He then goes on to describe his Eclipse + Eclemma plugin + GlassFish Embedded 3.1 + Maven configuration. He also discusses Global JNDI names (new in EJB 3.1) and the use of ANT with cases when you'll need in-place instrumentation of your code for proper code coverage execution.

Test Coverage for your Enterprise Beans. Running Eclemma with GlassFish 3.1
Embedded GlassFish with installation-less MySQL

In "Embedded GlassFish with installation-less MySQL", Bhavani discusses how to run tests using Embedded GlassFish with MySQL as the database (already running or not). This approach uses @DataSourceDefinition (new in Java EE 6 and placed here on servlets) with either the default JDBC driver or the Connector/MXJ utility. It also provides a sample persistence.xml for code using JPA.

In all the cases above, Embedded GlassFish is used via its Maven artifact: org.glassfish.extras:glassfish-embedded-[all|web]:3.1

Comments:

Post a Comment:
Comments are closed for this entry.