You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by Thomas McKiernan <MC...@uk.ibm.com> on 2006/06/05 12:31:16 UTC

sandesha shutdown

Dear All,

A change that we felt might be useful would be to the Sandesha module 
shutdown path (org.apache.sandesha2.SandeshaModule.shutdown) so that it 
actually waits for the sender/invoker threads to finish processing before 
returning. On that point, it also seems that for both sender and 
inorderinvoker threads it would be better to change the while(boolean) to 
while(getBoolean()) as the getter methods use synchronization which is of 
interest when the threads are stopping (see 
org.apache.sandesha2.workers.Sender#92 and 
org.apache.sandesha2.workers.OnOrderInvoker#94).

Any thoughts?

Thanks,
Tom
----------------------------------
Thomas McKiernan

WebSphere Messaging Development,
IBM United Kingdom Limited

Internal Phone: 248241 
External Phone: +44 (0)1962 818241
Mobile: +44 (0)789 1737497
Email: MCKIERNA@uk.ibm.com

Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21 
2JN


Caminante, no hay camino 
Se hace camino al andar.
("Walker, there is no path; the path is made by walking.")  Antonio 
Machado

Re: sandesha shutdown

Posted by Thomas McKiernan <MC...@uk.ibm.com>.
Hi Chamikara,

Thanks for your fix.

The reason we felt it would be good to wait for the threads to finish was 
not so much because we did not want to lose any work, but more that we did 
not want the possibility of sandesha threads continuing to spin after 
other parts of the axis2 engine etc had shutdown, just for reasons of 
cleanness.

Many thanks,
Tom

----------------------------------
Thomas McKiernan

WebSphere Messaging Development,
IBM United Kingdom Limited

Internal Phone: 248241 
External Phone: +44 (0)1962 818241
Mobile: +44 (0)789 1737497
Email: MCKIERNA@uk.ibm.com

Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21 
2JN


Caminante, no hay camino 
Se hace camino al andar.
("Walker, there is no path; the path is made by walking.")  Antonio 
Machado



"Chamikara Jayalath" <ch...@gmail.com> 
06/06/2006 09:29

To
sandesha-dev@ws.apache.org
cc

Subject
Re: sandesha shutdown






Hi Thomas,

Please see my comments below.


On 6/5/06, Thomas McKiernan <MCKIERNA@uk.ibm.com > wrote:

Dear All, 

A change that we felt might be useful would be to the Sandesha module 
shutdown path (org.apache.sandesha2.SandeshaModule.shutdown) so that it 
actually waits for the sender/invoker threads to finish processing before 
returning. 

In Axis2, Module.shutdown() method get called in a shutdown of the Axis2 
system. For example in the serviceclient.finaliszeInvoke() method or 
AxisServlet.destroy () method.

Due to this reason even though the Sandeshamodule tried to pause in its 
shutdown method Axis2 system may hv cleaned or finalized some other 
resources that are required for Sandesha2 to work correctly. So is there a 
value in that ?

A better mechanism may be to use a PermanentStoragemanager and to make 
sure that tha Sandesha2 system continues whatever the work it was doing 
after a restart.


On that point, it also seems that for both sender and inorderinvoker 
threads it would be better to change the while(boolean) to 
while(getBoolean()) as the getter methods use synchronization which is of 
interest when the threads are stopping (see 
org.apache.sandesha2.workers.Sender#92 and 
org.apache.sandesha2.workers.OnOrderInvoker#94).


Fixed :-)
 

Any thoughts? 

Thanks, 
Tom 
----------------------------------
Thomas McKiernan

WebSphere Messaging Development,
IBM United Kingdom Limited

Internal Phone: 248241 
External Phone: +44 (0)1962 818241
Mobile: +44 (0)789 1737497
Email: MCKIERNA@uk.ibm.com

Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21 
2JN


Caminante, no hay camino 
Se hace camino al andar.
("Walker, there is no path; the path is made by walking.")  Antonio 
Machado 


Re: sandesha shutdown

Posted by Thomas McKiernan <MC...@uk.ibm.com>.
Hi Chamikara,

Thanks for your fix.

The reason we felt it would be good to wait for the threads to finish was 
not so much because we did not want to lose any work, but more that we did 
not want the possibility of sandesha threads continuing to spin after 
other parts of the axis2 engine etc had shutdown, just for reasons of 
cleanness.

Many thanks,
Tom

----------------------------------
Thomas McKiernan

WebSphere Messaging Development,
IBM United Kingdom Limited

Internal Phone: 248241 
External Phone: +44 (0)1962 818241
Mobile: +44 (0)789 1737497
Email: MCKIERNA@uk.ibm.com

Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21 
2JN


Caminante, no hay camino 
Se hace camino al andar.
("Walker, there is no path; the path is made by walking.")  Antonio 
Machado



"Chamikara Jayalath" <ch...@gmail.com> 
06/06/2006 09:29

To
sandesha-dev@ws.apache.org
cc

Subject
Re: sandesha shutdown






Hi Thomas,

Please see my comments below.


On 6/5/06, Thomas McKiernan <MCKIERNA@uk.ibm.com > wrote:

Dear All, 

A change that we felt might be useful would be to the Sandesha module 
shutdown path (org.apache.sandesha2.SandeshaModule.shutdown) so that it 
actually waits for the sender/invoker threads to finish processing before 
returning. 

In Axis2, Module.shutdown() method get called in a shutdown of the Axis2 
system. For example in the serviceclient.finaliszeInvoke() method or 
AxisServlet.destroy () method.

Due to this reason even though the Sandeshamodule tried to pause in its 
shutdown method Axis2 system may hv cleaned or finalized some other 
resources that are required for Sandesha2 to work correctly. So is there a 
value in that ?

A better mechanism may be to use a PermanentStoragemanager and to make 
sure that tha Sandesha2 system continues whatever the work it was doing 
after a restart.


On that point, it also seems that for both sender and inorderinvoker 
threads it would be better to change the while(boolean) to 
while(getBoolean()) as the getter methods use synchronization which is of 
interest when the threads are stopping (see 
org.apache.sandesha2.workers.Sender#92 and 
org.apache.sandesha2.workers.OnOrderInvoker#94).


Fixed :-)
 

Any thoughts? 

Thanks, 
Tom 
----------------------------------
Thomas McKiernan

WebSphere Messaging Development,
IBM United Kingdom Limited

Internal Phone: 248241 
External Phone: +44 (0)1962 818241
Mobile: +44 (0)789 1737497
Email: MCKIERNA@uk.ibm.com

Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21 
2JN


Caminante, no hay camino 
Se hace camino al andar.
("Walker, there is no path; the path is made by walking.")  Antonio 
Machado 


Re: sandesha shutdown

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Thomas,

Please see my comments below.


On 6/5/06, Thomas McKiernan <MCKIERNA@uk.ibm.com > wrote:
>
>
> Dear All,
>
> A change that we felt might be useful would be to the Sandesha module
> shutdown path (org.apache.sandesha2.SandeshaModule.shutdown) so that it
> actually waits for the sender/invoker threads to finish processing before
> returning.
>

In Axis2, Module.shutdown() method get called in a shutdown of the Axis2
system. For example in the serviceclient.finaliszeInvoke() method or
AxisServlet.destroy () method.

Due to this reason even though the Sandeshamodule tried to pause in its
shutdown method Axis2 system may hv cleaned or finalized some other
resources that are required for Sandesha2 to work correctly. So is there a
value in that ?

A better mechanism may be to use a PermanentStoragemanager and to make sure
that tha Sandesha2 system continues whatever the work it was doing after a
restart.


On that point, it also seems that for both sender and inorderinvoker threads
> it would be better to change the while(boolean) to while(getBoolean()) as
> the getter methods use synchronization which is of interest when the threads
> are stopping (see org.apache.sandesha2.workers.Sender#92 and
> org.apache.sandesha2.workers.OnOrderInvoker#94).
>


Fixed :-)


Any thoughts?
>
> Thanks,
> Tom
> ----------------------------------
> Thomas McKiernan
>
> WebSphere Messaging Development,
> IBM United Kingdom Limited
>
> Internal Phone: 248241
> External Phone: +44 (0)1962 818241
> Mobile: +44 (0)789 1737497
> Email: MCKIERNA@uk.ibm.com
>
> Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21
> 2JN
>
>
> Caminante, no hay camino
> Se hace camino al andar.
> ("Walker, there is no path; the path is made by walking.")  Antonio
> Machado
>

Re: sandesha shutdown

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Thomas,

Please see my comments below.


On 6/5/06, Thomas McKiernan <MCKIERNA@uk.ibm.com > wrote:
>
>
> Dear All,
>
> A change that we felt might be useful would be to the Sandesha module
> shutdown path (org.apache.sandesha2.SandeshaModule.shutdown) so that it
> actually waits for the sender/invoker threads to finish processing before
> returning.
>

In Axis2, Module.shutdown() method get called in a shutdown of the Axis2
system. For example in the serviceclient.finaliszeInvoke() method or
AxisServlet.destroy () method.

Due to this reason even though the Sandeshamodule tried to pause in its
shutdown method Axis2 system may hv cleaned or finalized some other
resources that are required for Sandesha2 to work correctly. So is there a
value in that ?

A better mechanism may be to use a PermanentStoragemanager and to make sure
that tha Sandesha2 system continues whatever the work it was doing after a
restart.


On that point, it also seems that for both sender and inorderinvoker threads
> it would be better to change the while(boolean) to while(getBoolean()) as
> the getter methods use synchronization which is of interest when the threads
> are stopping (see org.apache.sandesha2.workers.Sender#92 and
> org.apache.sandesha2.workers.OnOrderInvoker#94).
>


Fixed :-)


Any thoughts?
>
> Thanks,
> Tom
> ----------------------------------
> Thomas McKiernan
>
> WebSphere Messaging Development,
> IBM United Kingdom Limited
>
> Internal Phone: 248241
> External Phone: +44 (0)1962 818241
> Mobile: +44 (0)789 1737497
> Email: MCKIERNA@uk.ibm.com
>
> Mail Point 211, IBM, Hursley Park, Winchester, Hampshire, England, SO21
> 2JN
>
>
> Caminante, no hay camino
> Se hace camino al andar.
> ("Walker, there is no path; the path is made by walking.")  Antonio
> Machado
>