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.
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
In all the cases above, Embedded GlassFish is used via its Maven artifact: