synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Valenta (Created) (JIRA)" <>
Subject [jira] [Created] (SYNAPSE-846) Few parts of the code that prevents normal Synapse termination when running as a web application
Date Tue, 21 Feb 2012 09:43:36 GMT
Few parts of the code that prevents normal Synapse termination when running as a web application

                 Key: SYNAPSE-846
             Project: Synapse
          Issue Type: Bug
    Affects Versions: 2.1
         Environment: Synapse is acting as a web application inside web container (Tomcat),
not tested as stand alone (but may be affected also).
            Reporter: Lukas Valenta
            Priority: Minor

When using synapse as a web application, I noticed that it is unable to stop (stop web application)
sucessfully. It leaves many threads running, which prevents web application and Tomcat itself
from shutdown. I tracked those threads and found parts of code which "creates them but do
not stop them". I created my own patch for those code parts and now application stops correctly.
I would be pleased if those changes appears in some future version so I will have no need
to hold "my own set of patches synapse and axis 2 classes". Changes to source codes of Synapse

- org.apache.synapse.core.axis2.SynapseStartUpServlet:80 (after serverManager.stop();):

  serverManager.shutdown();    // this must be called also

- org.apache.synapse.transport.nhttp.HttpCoreNIOListener in method stop(), just before the
end of try-catch block:


- org.apache.synapse.endpoints.AbstractEndpoint in method destroy() before "this.initialized
= false":

        if (metricsMBean != null) {
            metricsMBean = null;

- org.apache.axis2.transport.jms.ServiceTaskManager (I know this belongs to Axis2, but it
is the same problem):

  - in the method stop() after the initial logging:

        if (workerPool != null) {
            try {
            } catch (InterruptedException e) {
                log.error("Stopping WorkerPool failed", e);

  - in the method stop() after "sharedConnection.stop();":


Thank you

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message