You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Axis2Headaches <go...@yahoo.com> on 2010/04/29 23:41:13 UTC

[Axis2] Lifecycle Service scope="transportsession" destroy() never called

Axis2 version 1.5:
I have a SOAP web service deployed in the "transportsession" scope.

My service implements Lifecycle:
public class TestLifecycleSkeleton implements
TestLifecycleSkeletonInterface,
        Lifecycle {

    /**
     * Auto generated method signature
     * 
     * @param hello0
     */

    public org.example.www.testlifecycle.HelloResponse hello(
            org.example.www.testlifecycle.Hello hello0) {
        // TODO : fill this with the necessary business logic
        org.example.www.testlifecycle.HelloResponse result = new
org.example.www.testlifecycle.HelloResponse();
        result.setOut("Hello " + hello0.getIn());
        return result;
    }

    public void destroy(ServiceContext arg0) {
        String sessionId= MessageContext.getCurrentMessageContext()
        .getSessionContext().getCookieID();
        System.out.println("TestLifecycle destroy() for session id " +
sessionId + " " + System.currentTimeMillis());
    }

    public void init(ServiceContext arg0) throws AxisFault {
        String sessionId= MessageContext.getCurrentMessageContext()
        .getSessionContext().getCookieID();
        System.out.println("TestLifecycle init() for session id " +
sessionId + " " + System.currentTimeMillis());
    }

}

My tomcat axis2 web.xml has session-timeout set to 1 minute. (using tomcat
6.0.20)

My axis2.xml has the property manageTransportSession=true

I see that init() is called on every new session; however destroy() is never
called, anyone has any idea?
-- 
View this message in context: http://old.nabble.com/-Axis2--Lifecycle-Service-scope%3D%22transportsession%22-destroy%28%29-never-called-tp28406089p28406089.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: [Axis2] Lifecycle Service scope="transportsession" destroy() never called

Posted by John Grantham <jo...@notionlab.com>.

I am having a similar problem: set up transportsession, and the session
seems to live for as long as the client VM lives. I am looking for a way to
actually end the session, or at least confine it's lifecycle to that of the
client stub's lifecycle. 

Where you able to make any progress on this issue?




Axis2Headaches wrote:
> 
> Axis2 version 1.5:
> I have a SOAP web service deployed in the "transportsession" scope.
> 
> My service implements Lifecycle:
> public class TestLifecycleSkeleton implements
> TestLifecycleSkeletonInterface,
>         Lifecycle {
> 
>     /**
>      * Auto generated method signature
>      * 
>      * @param hello0
>      */
> 
>     public org.example.www.testlifecycle.HelloResponse hello(
>             org.example.www.testlifecycle.Hello hello0) {
>         // TODO : fill this with the necessary business logic
>         org.example.www.testlifecycle.HelloResponse result = new
> org.example.www.testlifecycle.HelloResponse();
>         result.setOut("Hello " + hello0.getIn());
>         return result;
>     }
> 
>     public void destroy(ServiceContext arg0) {
>         String sessionId= MessageContext.getCurrentMessageContext()
>         .getSessionContext().getCookieID();
>         System.out.println("TestLifecycle destroy() for session id " +
> sessionId + " " + System.currentTimeMillis());
>     }
> 
>     public void init(ServiceContext arg0) throws AxisFault {
>         String sessionId= MessageContext.getCurrentMessageContext()
>         .getSessionContext().getCookieID();
>         System.out.println("TestLifecycle init() for session id " +
> sessionId + " " + System.currentTimeMillis());
>     }
> 
> }
> 
> My tomcat axis2 web.xml has session-timeout set to 1 minute. (using tomcat
> 6.0.20)
> 
> My axis2.xml has the property manageTransportSession=true
> 
> I see that init() is called on every new session; however destroy() is
> never called, anyone has any idea?
> 

-- 
View this message in context: http://old.nabble.com/-Axis2--Lifecycle-Service-scope%3D%22transportsession%22-destroy%28%29-never-called-tp28406089p28589705.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org