users@jersey.java.net

[Jersey] Re: Reducing boot time for Jersey + Grizzly server

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Tue, 29 Mar 2011 16:20:54 -0700

Hi Arnaud,

On 03/28/2011 07:51 PM, Arnaud Bailly wrote:
> Hello Oleksiy,
> Thanks for your answer. I must confess I did not measure precisely the boot
> time, this is just a human feeling. And the console logs seem to point to
> the class scanning mechanims of Jersey as the main "culprit" :-)
>
> Anyway, I managed to find a simple solution: Use an Application object to
> pass to the servlet container, with all resources and providers created
> explicitly in the getSingletons() overriden method. I am not sure this is
> canonical but works pretty well and BTW solves a problem I had with

in fact, using the Application subclass is the standard
way to configure the JAX-RS application.

~Jakub


> maintaining singleton semantics through static variables, which I basically
> hate...
>
> Regards,
> Arnaud
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Reducing-boot-time-for-Jersey-Grizzly-server-tp6210445p6217507.html
> Sent from the Jersey mailing list archive at Nabble.com.
>