users@glassfish.java.net

Calling servlet methods from LifeCycle context

From: <glassfish_at_javadesktop.org>
Date: Mon, 13 Oct 2008 06:13:42 PDT

I'm trying to find a way to call a method in a web servlet given the name of the servlet. The method I want to call is annotated with a custom annotation.

I have got a similar scenario to work with EJB's by looking up the objects in the InitialContext, finding their class names via their MBeans, and getting their ClassLoader's from the ApplicationRegistry.

Could this be adapted to also work for web servlets or do I need to find a different approach?

Comments and help is much appreciated! :-)
[Message sent by forum member 'johan_martensson' (johan_martensson)]

http://forums.java.net/jive/thread.jspa?messageID=306048