File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed
modules/core/src/main/java/org/apache/synapse/config Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -1600,11 +1600,6 @@ public synchronized void destroy(boolean preserverState) {
16001600 }
16011601 }
16021602
1603- // destroy the managed mediators
1604- for (ManagedLifecycle seq : getDefinedSequences ().values ()) {
1605- seq .destroy ();
1606- }
1607-
16081603 //destroy sequence templates
16091604 for (TemplateMediator seqTemplate : getSequenceTemplates ().values ()) {
16101605 seqTemplate .destroy ();
@@ -1616,11 +1611,6 @@ public synchronized void destroy(boolean preserverState) {
16161611 // from registry. Only un-deployment should remove task from registry. Ref product-ei#1206
16171612 endpoint .destroy (false );
16181613 }
1619-
1620- // destroy the managed endpoints
1621- for (Endpoint endpoint : getDefinedEndpoints ().values ()) {
1622- endpoint .destroy ();
1623- }
16241614
16251615 // destroy the startups
16261616 for (ManagedLifecycle stp : startups .values ()) {
@@ -1657,16 +1647,22 @@ public synchronized void destroy(boolean preserverState) {
16571647
16581648 // destroy the Message Stores
16591649 for (MessageStore ms : messageStores .values ()) {
1660- if (ms instanceof AbstractMessageProcessor ) {
1661- ((AbstractMessageProcessor ) ms ).destroy (preserverState );
1662- } else {
1663- ms .destroy ();
1664- }
1650+ ms .destroy ();
16651651 }
16661652
16671653 for (API api : apiTable .values ()) {
16681654 api .destroy ();
16691655 }
1656+
1657+ // destroy the managed endpoints
1658+ for (Endpoint endpoint : getDefinedEndpoints ().values ()) {
1659+ endpoint .destroy ();
1660+ }
1661+
1662+ // destroy the managed sequences
1663+ for (ManagedLifecycle seq : getDefinedSequences ().values ()) {
1664+ seq .destroy ();
1665+ }
16701666 }
16711667
16721668 /**
You can’t perform that action at this time.
0 commit comments