Hi Farrukh,
please see inlines...
On 12.10.2011 23:09, Farrukh Najmi wrote:
>
> Hi Jakub,
>
> Thank you for your very helpful message.
>
> I forgot one other requirement. I need to be able to expose a REST
> endpoint in standalone java programs such as a Swing GUI.
Understood, then you need to manage the container directly from your
Java code.
> This works with the Grizzly Http container using the
> com.sun.jersey.spi.spring.container.servlet.SpringServlet and
> org.glassfish.grizzly.servlet.ServletHandler.
O.K. That's great. I would guess another Servlet container where this
would work is e.g. Jetty. But i am glad you picked up Grizzly first.
Another choice could be the GlassFish embedded server,
which gives you even more functionality over the two simpler ones
and you can still fully manage it directly from your Java code.
>
> Please see inline below...
>
> On 10/12/2011 12:54 PM, Jakub Podlesak wrote:
>> Hi Farukh,
>>
>> Are you going to utilize Jersey's Spring integration module
>> (contribs/jersey-spring)?
>
> Yes I am using
> com.sun.jersey.spi.spring.container.servlet.SpringServlet from that
> module.
O.K.
>
>> If yes, then all you need is a Servlet container (any low level http
>> servers are out of the game then).
>
> The answer is YES.
>
> So that rules out Simple HTTP Web server, Light weight HTTP server
> without additional impl work?
> Do I understand you right?
Yes.
>
> What do you mean by a Servlet container? What are my choices?
The containers mentioned above plus maybe some others.
Maybe some other user could suggest...
>
>> You just stick with Servlet dependency there is no need to introduce
>> a direct dependency
>> to Grizzly or any other container.
>
> I am not quite understanding. I need to have my standalone java app
> (no web container) expose a jersey server endpoint.
> What are my choices and what makes sense given the following summary
> requirements:
>
> * Jersey server needs to be deployed in a standalone app
> * Jersey server and support classes need to support dependency
> injection using Spring IoC
>
When suggesting you to stick with the Servlet dependency only, i was not
aware of that
"must be running from the same JVM" requirement. You may be able to
introduce a custom
SPI layer for starting/stopping the container with your JAX-RS
application, but it is up to you
to decide if it really makes sense in your case.
> *
>
>
>>
>> If you are going to utilize a lower level HTTP container, then you
>> probably end up
>> writing an integration for that and Jersey. Would you be interested
>> in contributing that back?
>
> If I went down that path I would be glad to give back to the jersey
> project which has been one of the best OS projects around. Kudos to
> you and your team mates.
Happy to hear that. Thanks!
~Jakub
>
>>
>> ~Jakub
>>
>> P.S. I am afraid we do not maintain any comparing matrix for the
>> supported containers.
>>
>> On 11.10.2011 22:53, Farrukh Najmi wrote:
>>>
>>> The following link lists several jersey containers:
>>>
>>> http://jersey.java.net/nonav/documentation/latest/chapter_deps.html#d4e1720
>>>
>>>
>>> Is there any matrix comparing these container features and tradeoffs?
>>>
>>> I need to be able to deploy a jersey server that uses spring IOC
>>> container with beans defines in spring application context files.
>>> My server need not support very large transaction rates so Grizzly
>>> may be overkill. I am not sure what is the difference between
>>> Simple HTTP Web server, Light weight HTTP server and Servlet
>>> containers.
>>>
>>> Thanks for your help.
>>>
>>
>
>
> --
> Regards,
> Farrukh Najmi
>
> Web:http://www.wellfleetsoftware.com
>