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 "Mario A. Rodriguez (JIRA)" <ji...@apache.org> on 2007/12/06 08:18:43 UTC

[jira] Created: (AXIS2-3387) destroy(SvcCtx) is never invoked when service deployed in request session scope

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: Axis 2.0 (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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-3387) destroy(SvcCtx) is never invoked when service deployed in request session scope

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-3387.
--------------------------------------

    Resolution: Fixed

Unfortunately thats how I have implemented the session support for request scope :( 

> 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: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3, 1.2
>            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.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Reopened: (AXIS2-3387) destroy(SvcCtx) is never invoked when service deployed in request session scope

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3387?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Glen Daniels reopened AXIS2-3387:
---------------------------------


a) this clearly isn't fixed.  b) it would actually be nice to have destroy() work the same way in all scopes (right now you get non-intuitive behavior), so it would be nice to actually see this fixed at some point.

Reopening.


> 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: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3, 1.2
>            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.
-
You can reply to this email to add a comment to the issue online.


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