users@jersey.java.net

[Jersey] Re: Deploying a Jersey App

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Wed, 23 May 2012 09:54:31 -0700

On Wed, May 23, 2012 at 2:03 AM, Issam Maamria <maamria_at_gmail.com> wrote:
> Hi all
>
> Thank you all for the great support!
>
> I have a basic question regarding deployment of Jersey. I want to set up a
> production environment to serve requests with JSON objects. What is the
> ideal setup? Is it Jersey on top of Tomcat on top of Apache? Or just Jersey
> and Tomcat?
>
> Thanks for sharing ideas

Some people like adding Apache in front, but unless your environment
has some specific need (like authentication integration needs, or
maybe ssl termination) it seems unnecessary in most cases.
Also, I prefer Jetty over Tomcat -- both work of course, but Jetty has
been more embeddable, easier to configure for all kinds of deployments
and setups.

But one thing that I have found useful is DropWizard
(http://dropwizard.codahale.com/), which is a framework built on top
of Jersey and. It runs on Jetty8/Jersey combination, configures POJO
(Jackson) JSON mapping, and produces a single runnable jar; configured
using a single json or yaml config file.
It really makes deployment a breeze.

-+ Tatu +-