users@jersey.java.net

Re: [Jersey] EmbeddedGlassfishTestContainerFactory in Jersey test framework

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 22 Apr 2010 13:22:25 +0200

On Apr 22, 2010, at 1:14 PM, Pavel Bucek wrote:

>
> Hi again,
>
> I have additional comment to your question. Paul noticed you are
> using EJB in your application. This unfortunately won't work with
> current Jersey Test framework, because it is using Glassfish 3.0-
> Prelude-Embedded-b14 which doesn't support EJB yet. Testing EJB
> would be possible when embedded GF v3.0+ will be integrated with
> Jersey Test Framework (and that will happen after Jersey switches to
> SE 6).
>
> Alternative for you is external test container - that means build
> your application with -Dmaven.test.skip=true, deploy it and run
>
> mvn test -
> Djersey
> .test
> .containerFactory
> =
> com
> .sun
> .jersey
> .test.framework.spi.container.external.ExternalTestContainerFactory -
> DJERSEY_HTTP_PORT=port# -DJERSEY_HOST_NAME=hostname
>
> You might find more info about testing Jersey-based applications in
> our user guide [1]
>

It might be possible to the external test container with the maven GF
plugin for embedded GF. For an example see the attachment Beatriz sent
in the following email:

   http://markmail.org/search/?q=list
%3Anet.java.dev.jersey.users#query:list%3Anet.java.dev.jersey.users
+page:1+mid:mujyrkf75odlnb7j+state:results

Paul.