-
1. Re: Howto listen for re-deployment?
raja05 Aug 21, 2003 8:46 AM (in response to mjremijan)I have this in my servlet
public void destroy() {
.......
}
and it gets invoked at the undeploy operation. IS this the same that u are using?
-Raj -
2. Re: Howto listen for re-deployment?
mjremijan Aug 21, 2003 9:06 AM (in response to mjremijan)Yes, I have this method implemented in my servlet. Right now all I have is a system.out.println() statment to verify that it is being called. When I do a hot re-deployment, however, I never see the output on the console, so i'm assuming it's not being called. I'm using jboss-3.2.1-tomcat-4.1.24
Mike -
3. Re: Howto listen for re-deployment?
raja05 Aug 21, 2003 9:25 AM (in response to mjremijan)Mike,
I just wrote a piece of code to test this, This is my servlet
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import java.io.IOException;
import java.io.PrintWriter;
/**
* @web.servlet name="TestServlet"
*
* @web.servlet-mapping url-pattern="/test"
*/
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
PrintWriter out = res.getWriter();
out.println("In doGet");
}
public void destroy() {
System.out.println("Here in destroy");
}
}
And this is what i get in my console when i redeploy it.
11:16:34,590 INFO [STDOUT] Here in destroy
Im using jboss-3.0.4 with tomcat.
-Raj -
4. Re: Howto listen for re-deployment?
mjremijan Aug 21, 2003 10:36 AM (in response to mjremijan)arrrgh!!! all my fault. I had Destroy() not destroy(). Sorry about that.
Mike