Thanks for the quick reply.

Regarding the Exception. What would be the recommended approach for cases where init() is not able to complete successfully? In my case init() might fail because the database can't be started (bad configuration, etc.). With a Servlet I can throw a ServletException and the container (Tomcat) will stop the application. What should a WebApplication do?


Thanks,

Marty

Igor Vaynberg wrote:
i just checked in a destroy() method you can override on the application.

as far as the servletexception i dont think this is proper to throw from the application because application is not a servlet. who is to say application is even backed by a servlet.

-Igor


On 4/25/06, *Marty Backe* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I've decided to build a project at work, based on Wicket. So no
    doubt this
    is a newbie question. Any help would be appreciated. Hopefully it's a
    simple question to answer.

    In my WebApplication based class, I setup my database, etc. in the
    init()
    method. I'd like to shutdown the database when the servlet is
    destroyed
    (I'm deploying in Tomcat), so my first thought would be to override
    destroy(), but this isn't an available method of WebApplication.

    What's the recommended approach?

    Along the same lines, I had also wanted to throw a
    ServletException if I
    couldn't setup the database in init(), but that's not available to me
    either.


    Thanks much for any guidance.

    Marty Backe







    -------------------------------------------------------
    Using Tomcat but need to do more? Need to support web services,
    security?
    Get stuff done quickly with pre-integrated technology to make your
    job easier
    Download IBM WebSphere Application Server v.1.0.1 based on Apache
    Geronimo
    http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
    <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
    _______________________________________________
    Wicket-user mailing list
    [email protected]
    <mailto:[email protected]>
    https://lists.sourceforge.net/lists/listinfo/wicket-user




--


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to