tags:

views:

4

answers:

0

I'm having trouble with a jersey application running on a jetty server that will take up to 30 seconds to start. I don't know what causes this behaviour, and I'm unsure how to debug it.

Jersey is not started until the first HTTP request to one of its services are made. After the first request is made, the following gets printed:

INFO: Initiating Jersey application, version 'Jersey: 1.3 06/17/2010 04:53 PM'

After that, 5 to 45 seconds pass, and then jersey prints info about what resources it found and replies to the HTTP request.

First, I'd like to force jersey to start when the rest of the app starts as a hack to get around this until I find the culprit. Is there any way to do that without emulating an actual HTTP request to jetty?

Second, I'm stumped as to how to debug this. I've checked the constructors in my service classes, and they don't appear to be responsible. Has anyone had similar problems with jersey?