users@jersey.java.net

[Jersey] Re: Jetty embedded JerseyTest Container

From: Joseph Mocker <jmocker_at_velti.com>
Date: Mon, 17 Jun 2013 10:05:15 -0700

Hi,

Yes, sorry if I misrepresented the problem. Here's the discussion I had found about it before. The problem is with within the JerseyTest, not the container itself.

        http://jersey.576304.n2.nabble.com/Filter-not-executing-when-running-a-JerseyTest-td4971178.html

Interestingly, though the workaround I use with the Jetty container (by setting the filter *after* setting the servlet in WebAppDescriptor) doesn't work with the Grizzly container.

  --joe



Joseph Mocker | Velti | Senior Software Architect
t +1.650.566.7033 m
e jmocker_at_velti.com @Mobclix

The leading global technology provider of
mobile marketing and advertising solutions

On Jun 17, 2013, at 9:35 AM, Pavel Bucek wrote:

> Oleksiy,
>
> this is not limitation of Grizzly; If I recall correctly, problem was in design of JerseyTest class (core of Jersey Test Framework).
>
> Pavel
>
> On 6/17/13 6:14 PM, Oleksiy Stashok wrote:
>> Hi Joe,
>>
>> On 16.06.13 16:16, Joseph Mocker wrote:
>>> Hi,
>>>
>>> The grizzly container does support filters and servlets but you cannot configure both together. This is a limitation that has been discussed in previous threads.
>> Can you pls. give me a pointer to this discussion? Want to understand why it doesn't work.
>>
>> Thank you.
>>
>> WBR,
>> Alexey.
>>
>>> And that was the motivation for writing the jetty connector since I need both in my application.
>>>
>>> Startup/shutdown is pretty snappy, when compared to other phases like hibernate & spring, but I have not timed it for comparison to grizzly.
>>>
>>> --joe
>>>
>>> On Jun 16, 2013, at 3:48 PM, "cowwoc" <cowwoc_at_bbs.darktech.org> wrote:
>>>
>>>> Hi Joseph,
>>>>
>>>> I'm glad someone has finally added Jetty support! I will look into your project later on this week.
>>>>
>>>> Out of curiosity, how is this better than the Grizzly test container? Doesn't the latter provide servlet/filter support? Is Jetty any faster for startup/shutdown?
>>>>
>>>> Thanks,
>>>> Gili
>>>>
>>>> On 15/06/2013 10:52 AM, Joseph Mocker wrote:
>>>>> Hi,
>>>>>
>>>>> I was frustrated by the inability of the JerseyTest 1.x containers to configure both a Filter and a Servlet, so I wrote a Jetty-based in-memory JerseyTest Container which can.
>>>>>
>>>>> This is particularly useful when using both Spring (IoC) and Spring Security with Jersey which need can sometimes need both to work correctly.
>>>>>
>>>>> Check it out over at Github -
>>>>>
>>>>> https://github.com/creechy/jetty-jerseytest-container
>>>>>
>>>>> Cheers.
>>>>>
>>>>> --joeJoseph Mocker | Velti | Senior Software Architect
>>>>> t +1.650.566.7033 m
>>>>> e jmocker_at_velti.com @Mobclix
>>>>>
>>>>> The leading global technology provider of
>>>>> mobile marketing and advertising solutions
>>
>>
>>
>