Implement org.apache.axis2.Service interface to your service implementation.

init method will be called when your service gets deployed.

setOperationContext method will be called, whenever your service is
invoked, by which you can access the config context.

-- Chinthaka

Johan Lundberg wrote:
> two questions:
> 
> 1.
> Is there any way to get a signal when axis2 deploys my web service? In
> axis1, my app was part of the web app and I could do the following:
> 
> /** receiving Signal when web application starts **/
> 
> public class InfoHandler implements ServletContextListener
> {
>    public void contextInitialized(ServletContextEvent sce)
>    {
> 
>    ....
>    ....
>        this.timer.schedule(new ScheduledAction(sce), 0, 600000); // 10
> minutes
>      }
> }
> 
> 2.
> Is there any way to get the ConfigurationContext from my web service
> app? I need it in order to get the "real path" before writing a file in
> the web container.
> 
> /*** Getting the real path ***/
> 
> Axis1 specific way of getting servletcontext
> HttpServlet srv = (HttpServlet)
> MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET);
> 
> this.srvCtx = srv.getServletContext();
> String path = this.srvCtx.getRealPath("/");
> 
> 
> Any advice is welcome.
> /johan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to