Configuring OEM to detect servlet.init() failures
I'm trying to move some one-time initialization into a servlet .init() method and I wanted to see what would happen in OEM (Oracle Enterprise Manager) when this servlet's init() method failed (by throwing ServletException). I wrote a simple Servlet that does nothing but fail when it attempts to initialize. I was hoping to see a Stop Sign or something in OEM when I deloyed it, but instead OEM thinks everything is fine. Does anyone know how to make OEM aware of the actual state of the Servlets deployed under the OC4J containers?
Bob
package demos;
import org.apache.struts.action.ActionServlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletContext;
public class MyActionServlet extends ActionServlet {
public MyActionServlet() { }
public void init() throws ServletException {
super.init();
throw new ServletException( new Exception("I failed to init...DO SOMETHING!"));
}
}