ServerServlet load Application eagerly?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

ServerServlet load Application eagerly?

I'm passing in an org.restlet.application param to the ServerServlet and the application doesn't load until the first request actually comes in. That is what I would expect of course and the source code shows that lazy initialization is what the authors were trying to achieve. But for my purpose I need the Application to load eagerly (when the ServerServlet loads) since my Application and ServerResource objects are not only taking requests but are also part of a scheduling framework. I suppose what I am asking for are suggestions for the simplest way to load the Application object into the ServerServlet eagerly. I am willing to extend ServerServlet if I have to. Any suggestions?

Reply | Threaded
Open this post in threaded view

Re: ServerServlet load Application eagerly?

This post has NOT been accepted by the mailing list yet.
Any updates to this question?  I too am wanting my Application class to initialize when my container(Tomcat) is started.

I've tried the following with no luck:


I have read suggestion of subclassing ServerServlet but would rather not have to do that.

Any other suggestions?