[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wsf-c-dev
Subject:    [Dev] [BAM] BAM Mediator doesn't send events when invoked from a sequence.
From:       Rajith Siriwardena <rajith () wso2 ! com>
Date:       2014-05-31 9:57:44
Message-ID: CAA6vrvEoc-2yY6+OR+21eKoF595eDTUknzes6bwfRkq6qAMbmQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
$Subject. From the following code chunks,

---------------------------- BamMediator.java
AxisService service = msgCtx.getAxisService();
if(service == null)

{ return true; }
// When this is not inside an API theses parameters should be there
if ((!service.getName().equals("__SynapseService")) &&
(service.getParameter(ADMIN_SERVICE_PARAMETER) != null ||
service.getParameter(HIDDEN_SERVICE_PARAMETER) != null)) { return true; }

---------------------------- PayloadDataBuilder.java
try

{ service = msgCtx.getAxisService().getName(); }

catch (Exception e)

{ String errorMsg = "Error occurred while Service Name is extracted. " +
e.getMessage(); log.error(errorMsg, e); service = ""; }

--------------------------- StreamDefinitionBuilder.java
attributes.add(new Attribute(BamMediatorConstants.SERVICE_NAME,
AttributeType.STRING));
---------------------------


if the it is invoked from a proxy the value of service = <proxy which it is
invoked> and it works. when it is invoked from a sequence service is null
and it ends there

as a solution to that I have removed the parts which checks the service and
dropped it from sending with events. if it isn't violating any use case,
attached patch to the jira issue can be used as a fix.

jira issue: https://wso2.org/jira/browse/BAM-1642

Thanks,
--Rajith

-- 
*Rajith Siriwardana*
Software Engineer
WSO2 Inc. ; http://wso2.com
*lean. enterprise. middleware*

*www: **http://people.apache.org/~siriwardana
<http://people.apache.org/~siriwardana>*

[Attachment #5 (text/html)]

<div dir="ltr"><div>Hi,  </div>$Subject. From the following code \
chunks,<br><br>---------------------------- BamMediator.java<br>AxisService service = \
msgCtx.getAxisService();<br>if(service == null)<br><br>{ return true; }<br>

// When this is not inside an API theses parameters should be there<br>if \
((!service.getName().equals(&quot;__SynapseService&quot;)) \
&amp;&amp;<br>(service.getParameter(ADMIN_SERVICE_PARAMETER) != null \
||<br>service.getParameter(HIDDEN_SERVICE_PARAMETER) != null)) { return true; }<br>

<br>---------------------------- PayloadDataBuilder.java<br>try<br><br>{ service = \
msgCtx.getAxisService().getName(); }<br><br>catch (Exception e)<br><br>{ String \
errorMsg = &quot;Error occurred while Service Name is extracted. &quot; + \
e.getMessage(); log.error(errorMsg, e); service = &quot;&quot;; }<br>

<br>--------------------------- StreamDefinitionBuilder.java<br>attributes.add(new \
Attribute(BamMediatorConstants.SERVICE_NAME, \
AttributeType.STRING));<br>---------------------------<div><br></div><div><br>if the \
it is invoked from a proxy the value of service = &lt;proxy which it is invoked&gt; \
and it works. when it is invoked from a sequence service is null and it ends \
there<br>

<br>as a solution to that I have removed the parts which checks the service and \
dropped it from sending with events. if it isn&#39;t violating any use case, attached \
patch to the jira issue can be used as a fix.<br><div> <br>
</div><div>jira issue:  <a \
href="https://wso2.org/jira/browse/BAM-1642">https://wso2.org/jira/browse/BAM-1642</a></div><div><br></div><div>Thanks,</div><div>--Rajith</div><div><br></div>-- \
<br><div dir="ltr"><b><font face="arial narrow, sans-serif">Rajith \
Siriwardana</font></b><div>

<font face="arial narrow, sans-serif">Software Engineer</font></div><div><font \
face="arial narrow, sans-serif">WSO2 Inc. ;<span style="color:rgb(136,136,136)">  \
</span><a href="http://wso2.com/" style="color:rgb(17,85,204)" \
target="_blank">http://wso2.com</a></font></div>

<span style="background-color:rgb(255,255,255)"><font color="#000000" face="arial \
narrow, sans-serif"><i>lean. enterprise. middleware</i></font></span><div><font \
color="#000000" face="arial narrow, sans-serif"><br></font><div>

<font face="arial narrow, sans-serif"><i>www:  </i></font><font face="arial narrow, \
sans-serif"><i><a href="http://people.apache.org/~siriwardana" \
target="_blank">http://people.apache.org/~siriwardana</a></i></font><br></div>

</div></div>
</div></div>



_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic