axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIS2-3387) destroy(SvcCtx) is never invoked when service deployed in request session scope
Date Mon, 25 Jun 2012 07:26:43 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sagara Gunathunga  resolved AXIS2-3387.
---------------------------------------

    Resolution: Fixed

destroy() method work correctly with recent releases hence mark this as fixed.  
                
> destroy(SvcCtx) is never invoked when service deployed in request session scope
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-3387
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3387
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2, 1.3
>            Reporter: Mario A. Rodriguez
>
> My service implementation class contains the following method signatures:
> 	public void init(ServiceContext context)
> 	{
> 		System.out.println("init called");
> 	}
> 	public void destroy(ServiceContext context)
> 	{
> 		System.out.println("destroy called");
> 	}
> The service is then deployed using the default "request" scope.
> When I invoke the service the init() method is always invoked, but the destroy() method
is never called. If I understand the doc correctly the destroy() method should be invoked
after the operation completes, or perhaps I'm mistaken?
> If I change the session scope to "soapsession" then the destroy() method is actually
invoked. Although it doesn't appear to be invoked automatically after the 30 second timeout,
it waits until another request arrives and then clears out any sessions older than 30 seconds.
> My service implementation acquires a number of resources in the init() method and I was
hoping to rely on the calls to destroy() in order to free those resources, preferably after
completion of every request. The next best option would have been to use a short timeout for
the SOAP session, but it looks like neither session scope is able to provide a deterministic
way to free resources.
> Any suggestions would be appreciated.
> Thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message