users@glassfish.java.net

Re: GlassFish v3 - separate ejb container jar file?

From: Jacek Laskowski <jacek_at_laskowski.net.pl>
Date: Wed, 16 Jan 2008 10:08:13 +0100

On Jan 15, 2008 6:09 PM, Ryan de Laplante <ryan_at_ijws.com> wrote:
> That is really good to hear - especially when EJB 3.1 is available. Just
> to be clear, when you say "within a single (client) VM", you mean that
> we will be able to start/stop an EJB container inside of unit tests
> completely independent of an application server? Will the startup time
> be sub-second like Spring, allow you to pass in different configurations
> for testing, let you add JTA if you need transactions, etc?
>
> I've talked with people who didn't want to use EJB because it was too
> hard to do testing with. Ejb3unit might help (I haven't tried it), but
> having a real container available in unit tests like Spring will really
> help.

Hi,

I don't want to hijack the thread, but there's already a solution for
this particular issue with inability to test ejbs easily - Apache
OpenEJB [1]. With its features one can run EJB3 tests outside the
container just like JPA can. See yourself what it is like to run a
junit test with ejb (and openejb embedded) [2]. Of course, more will
come when EJB 3.1 arrives and other ejb containers let you do this as
well where you can plug in and out containers.

Jacek

[1] http://openejb.apache.org/
[2] http://openejb.apache.org/examples.html

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl