You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Lucas Moten (JIRA)" <ji...@apache.org> on 2008/08/26 16:36:44 UTC

[jira] Updated: (SYNAPSE-437) Initialize Inline Fault Sequences for Proxy Targets

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

Lucas Moten updated SYNAPSE-437:
--------------------------------

    Description: 
When synapse is initialized, target inline in and out sequences are initialized for proxies.  Inline fault sequences that contain mediators requiring initialization will fail with a null pointer exception because they are not initialized.

The inline fault sequences appear to be initialized only from the ProxyService start method.  This is turn does not appear to be called by synapse core, but is utilized by a separate, but related project, WSO2 ESB admin interface in the ProxyServiceAdmin class (startProxyService and saveProxyService).  When synapse core is started, all proxies are running by default, initialized via SynapseConfiguration.  Those proxies that are explicitly configured with startOnLoad attribute set to false are then stopped.  

Workaround: Use named sequences for proxies which are initialized when synapse is started.  Named sequences are initialized independently of proxy targets from the SynapseConfiguration init method.  Most samples available with synapse make use of named sequences.

Recommended fix: Initialize target inline fault sequences for proxies in SynapseConfiguration class

  was:
When synapse is initialized, target inline in and out sequences are initialized for proxies.  Inline fault sequences that contain mediators requiring initialization will fail with a null pointer exception because they are not initialized.

The inline fault sequences appear to be initialized only from the ProxyService start method.  This is turn does not appear to be called by synapse core, but is utilized by a separate, but related project, WSO2 ESB admin interface in the ProxyServiceAdmin class (startProxyService and saveProxyService).  When synapse core is started, all proxies are running by default, initialized via SynapseConfiguration.  Those proxies that are explicitly configured with startOnLoad attribute set to false are then stopped.  

Workaround: Use named sequences for proxies which are initialized when synapse is started.  Named sequences are initialized independently of proxy targets from the SynapseConfiguration init method.  Most samples available with synapse make use of named sequences.

Recommended fix: Initialize target inline fault sequences for proxies in Synapse Configuration

Index: modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java
===================================================================
--- modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java	(revision 688865)
+++ modules/core/src/main/java/org/apache/synapse/config/SynapseConfiguration.java	(working copy)
@@ -825,6 +825,10 @@
                 if (p.getTargetInLineOutSequence() != null) {
                     p.getTargetInLineOutSequence().init(se);
                 }
+                
+                if (p.getTargetInLineFaultSequence() != null) {
+                	p.getTargetInLineFaultSequence().init(se);
+                }
         }
 
         // initialize managed mediators


Moving patch to file attachment

> Initialize Inline Fault Sequences for Proxy Targets
> ---------------------------------------------------
>
>                 Key: SYNAPSE-437
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-437
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core, Proxy Services
>            Reporter: Lucas Moten
>            Priority: Minor
>         Attachments: SynapseConfiguration_Init_TargetInlineFaultSequence.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When synapse is initialized, target inline in and out sequences are initialized for proxies.  Inline fault sequences that contain mediators requiring initialization will fail with a null pointer exception because they are not initialized.
> The inline fault sequences appear to be initialized only from the ProxyService start method.  This is turn does not appear to be called by synapse core, but is utilized by a separate, but related project, WSO2 ESB admin interface in the ProxyServiceAdmin class (startProxyService and saveProxyService).  When synapse core is started, all proxies are running by default, initialized via SynapseConfiguration.  Those proxies that are explicitly configured with startOnLoad attribute set to false are then stopped.  
> Workaround: Use named sequences for proxies which are initialized when synapse is started.  Named sequences are initialized independently of proxy targets from the SynapseConfiguration init method.  Most samples available with synapse make use of named sequences.
> Recommended fix: Initialize target inline fault sequences for proxies in SynapseConfiguration class

-- 
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: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org