users@jersey.java.net

Re: [Jersey] EmbeddedGlassfishTestContainerFactory in Jersey test framework

From: Jay Wang <glacierzr_at_gmail.com>
Date: Wed, 28 Apr 2010 10:53:04 +0100

Hi Pavel and Paul

Thanks for advice, I have figured out use external server to test the
request now.
There is a good example from netbeans 6.8 which is using external GF to do
jersey testing.

/J

On 22 April 2010 12:22, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

> 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.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>


-- 
-------------------
/T