I use RestEasy to develop a web application. I have a class that
extends javax.ws.rs.core.Application and registers the REST services.
After the creation and (full) initialization of all the services I
want to execute some methods of these services. These methods may call
other methods of the service using the REST API.

The problem is that until the moment that my subclass of
javax.ws.rs.core.Application is initialized (end of constructor) the
REST API is not available (calls using REST API block) so it is not
possible to call the methods after the service initialization. I also,
tried using org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
without success.

Also, ServletContextListener.contextInitialized seems to be executed
earlier than the javax.ws.rs.core.Application.init so there are no
references to the service objects.

In general, I am looking for a clean way to execute code right after
the services are available/deployed. Is there any way to be notified
for such an event?

Thank you,
Alex

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to