You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Joan Pont <jp...@nortelnetworks.com> on 2003/12/02 19:25:02 UTC

RE: Bug#: 11815 ServiceLifecycle.destroy() never called when sess ion is destroyed

Hi,
	I've moved servlet.jar and now I don't get the error in the
Catalina.out.
      But I still don't the destroy() method is not being called when the
session terminates.
	Any ideas? What else could I try?

Thanks,
Joan.


-----Original Message-----
From: Davanum Srinivas [mailto:dims@yahoo.com] 
Sent: 01 December 2003 17:17
To: axis-dev@ws.apache.org
Subject: RE: Bug#: 11815 ServiceLifecycle.destroy() never called when sess
ion is destroyed

remove the servlet.jar from your axis/WEB-INF/lib directory.

--- Joan Pont <jp...@nortelnetworks.com> wrote:
> Hi Glen,
> 
> 	I've built the *.jar files with the latest CVS version. I've copied
> them from the /build/lib directory to tomcat's lib directory (that's on
the
> classpath for Axis) from a previously installed Axis version1.1
> 	I've changed the web.xml file (got it from CVS).
> 	Is there anything else that should be done?
> 
> 	Could you please tell me which ones are the java files and the
> config files that must be replaced?  So I can patch the release Version
Axis
> 1.1, instead of building a new one.
> 
> 	At the moment I get the init called every time there is a new client
> connecting for the fist time but I don't get calls to finalize/destroy
(see
> the XlmServerServiceBindingImpl.java below.
> 	Any ideas? 
> 	I've got a session enabled client -based on cookies- that sends
> multiple requests and then terminates. I've waited for more than the 5
> minutes session timeout. 	
> 	I don't even get calls to finalize when I shutdown TOMCAT.
> 
> 	I get the following in the Catalina.out 
> WebappClassLoader:
>
validateJarFile(/mdn05/gembuild/3rdparty/jakarta-tomcat-4.0/jakarta-tomcat-4
> .1.27/webapps/axis/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet
> Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
> 
> 	Is it a problem?
> 
> 	In the deployment descriptor of I've got Session scope.
> 	The ServiceBindingImpl is as follows:
> 
> /**
>  * XlmServerServiceBindingImpl.java
>  *
>  * This file was auto-generated from WSDL
>  * by the Apache Axis WSDL2Java emitter.
>  */
> 
> package com.nortelnetworks.gem18pi;
> 
> import java.rmi.Remote;
> import java.rmi.Remote.*;
> import javax.xml.rpc.server.ServiceLifecycle;
> import javax.xml.rpc.server.ServletEndpointContext;
> import javax.xml.rpc.handler.soap.SOAPMessageContext;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.ServletConfig;
> import javax.servlet.*;
> import java.security.Principal;
> import javax.xml.rpc.handler.*;
> import javax.xml.rpc.Call;
> import org.apache.commons.logging.Log;
> import org.apache.axis.components.logger.LogFactory;
> import org.apache.log4j.Logger;
> import org.apache.log4j.BasicConfigurator;
>     
> 
> public class XlmServerServiceBindingImpl implements
> com.nortelnetworks.gem18pi.XlmServerServicePortType, ServiceLifecycle{
>     private ServletEndpointContext serviceContext;
>     private static Log log =
> LogFactory.getLog(XlmServerServiceBindingImpl.class.getName());
> 
>     public void init (java.lang.Object context) {
>       serviceContext= (ServletEndpointContext) context; 
>       log.info("XlmServerServiceBindingImpl: Init called, service
context"+
> toString());
>       BasicConfigurator.configure();
> 
>     public void destroy () {
>       log.info("XlmServerServiceBindingImpl: destroy called");
>     }
>     public void finalize () {
>       log.info("XlmServerServiceBindingImpl: finalize called");
>     }
> }
> 
> Thank you very much for your help!
> Joan.	
> 	
> 
> 
> -----Original Message-----
> From: Glen Daniels [mailto:glen@thoughtcraft.com] 
> Sent: 29 November 2003 06:45
> To: axis-dev@ws.apache.org
> Subject: Re: Bug#: 11815 ServiceLifecycle.destroy() never called when
> session is destroyed
> 
> Hi folks:
> 
> Sorry, just tuning in to this thread.  Um, this problem has actually
already
> been fixed.  The AxisHttpSessionListener is checked in, correctly
dispatches
> session destroy events to any session-controlled object which implements
> ServiceLifecycle, and the appropriate changes have been made to the
default
> web.xml.  This stuff is all in the current CVS.
> 
> Have you tried out the CVS version, Joan?  If something isn't working for
> you, we'd like to know about it.
> 
> Thanks,
> --Glen
> 
> ----- Original Message ----- 
> From: "Joan Pont" <jp...@nortelnetworks.com>
> To: <ax...@ws.apache.org>
> Sent: Friday, November 28, 2003 12:52 PM
> Subject: RE: Bug#: 11815 ServiceLifecycle.destroy() never called when
> session is destroyed
> 
> 
> > Steve,
> > Sorry, I'm quite new in Axis. At the moment I'm just evaluating it
> > to be able to see if we can use it in our product.
> > And for us it is essential to know or to be notified when a session
> > has terminated - the client leaves or the connection drops.
> >
> > Could you provide more details on how to do what you mention below?
> >
> > The appropriate listener is in transports.http, it just needs to be
> > wired in and tested. That's right: tested. Think of a good service tha
> > can test that sessions are cleaned up and then implement it and the
> > client side stuff.
> >
> > I suppose that you are referring to class HttpMessageExchange in
> > org.apache.axis.ime.internal.transports.http
> > Perhaps I'm being blind here, but I don't see how to be notified of
> > session lifecycle events here. How should I implement the Interface
> > MessageExchangeEvent?
> > I've got a service running now and I would be able to test that with
> > session enabled clients.
> >
> > As well, if possible we'd like something that is not completely Axis
> > specific.
> > Would it be possible to do the same with the Axis implementation of
> > the standard JAX-RPC? (I getting the ServiceLifecycle working seems
> > important)
> >
> > Please detailed help of how to achieve that would be really
> > appreciated.
> >
> > Thanks again.
> > Joan.
> >
> >
> > -----Original Message-----
> > From: Steve Loughran [mailto:steve_l@iseran.com]
> > Sent: 27 November 2003 20:16
> > To: axis-dev@ws.apache.org
> > Subject: Re: Bug#: 11815 ServiceLifecycle.destroy() never called when
ses
> > sion is destroyed
> >
> > Joan Pont wrote:
> >
> > > Thanks Steve,
> > >         Could you please explain in more detail your paragraph?
> > >
> > > as axis 1.2 is servlet2.3+, we dont need the housekeeping, we can use
> > > servlet lifecycle events, we just need someone to write the code and
> > > web.xml changes to do this.
> > >
> > >         Does it mean that with Axis 1.2 if the user implements the
code
> > > for servlet lifecycle event it will correctly call the
> > > sessionCreated/sessionDestroyed? How will this be done?
> >
> >
> > The appropriate listener is in transports.http, it just needs to be
> > wired in and tested. That's right: tested. Think of a good service tha
> > can test that sessions are cleaned up and then implement it and the
> > client side stuff.
> >
> > >
> > >
> > >         Is there another way around so I can free session allocated
> > > resources when the session terminates from my
> > > MyServiceServiceBindingImpl class that is auto-generated by the Axis
> > > WSDL2Java emitter?
> > >
> > >         When will axis 1.2 be out?
> >
> > when it is ready. It goes into alpha soonish. But dont expect Axis1.2 to
> > meet your needs without help: in the open source world, you have to help
> > to get products where you want them to be.
> >
> > > Thanks,
> > > Joan.
> > >
> > >
> > > -----Original Message-----
> > > From: Steve Loughran [mailto:steve_l@iseran.com]
> > > Sent: 26 November 2003 22:58
> > > To: Pont, Joan [MOP:GM12:EXCH]
> > > Cc: 'gdaniels@apache.org'; 'stevel@apache.org'; 'st946tbf@drexel.edu'
> > > Subject: Re: Bug#: 11815 ServiceLifecycle.destroy() never called when
> > > session is destroyed
> > >
> > > Joan Pont
> > >  > Hi,
> > >  >         I've seen the problem with the ServiceLifecycle.destroy()
> 
=== message truncated ===


=====
Davanum Srinivas - http://webservices.apache.org/~dims/