java - Is it a good practice to override implementation of ServletContextListener? -


i have developed web service using jax-ws , in web.xml had servlet context listener registered.

<listener>     <listener-class>com.sun.xml.ws.transport.http.servlet.wsservletcontextlistener</listener-class> </listener> 

but, have specific function done when web service , when web service down. way think of, create servletcontextlistener , and add in web.xml.

but override 1 specified (as shown above <listener> tag).

my worry in case wsservletcontextlistener might implementing servletcontextlistener methods , must doing specific work in it.

i tried extend wsservletcontextlistener class final cannot. way can take wsservletcontextlistener instance member listener class , wrap methods provided it. practice?

make own listener , declare in new <listener>..</listener> tag. 2 listeners should invoked in order specified in web.xml.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -