Friday, June 27, 2014

Compare the values of property in WSO2 ESB

Most of the time i use to get question on "How to compare the values of the property in WSO2 EBS" from most of the wso2 ESB users. WSO2 ESB give a adequate support for value comparison for properties.

I have created simple configuration to demonstrate that functionality.
<property name="propertyA" value="'abc'"/>
<log level="custom">
<property name="propertyA" expression="get-property('propertyA')"/>
</log>
<property name="propertyB" value="'abc'"/>
<log level="custom">
<property name="propertyB" expression="get-property('propertyB')"/>
</log>
<property name="propertyCompare" expression="get-property('propertyA') = get-property('propertyB')"/>
<log level="custom">
<property name="propertyCompare" expression="get-property('propertyCompare')"/>
</log>
<filter source="get-property('propertyCompare')" regex="true">
<then>
<log level="custom">
<property name="filterA" expression="'worked'"/>
</log>
</then>
</filter>
<filter xpath="get-property('propertyA') = get-property('propertyB')">
<then>
<log level="custom">
<property name="filterB" expression="'worked'"/>
</log>
</then>
</filter>
view raw propertyCompare hosted with ❤ by GitHub
 

Tuesday, June 3, 2014

Enable Unlimited Scrolling in the Terminal - Ubuntu


Usually while i am testing my server logs the output from a command can be so so lengthy and hard to able scroll back to the beginning. Therefore, I always set the terminal of the each machine that i work to display as many lines as unlimited scrolling.

In the terminal, go to Edit > Profile Preferences, and in the Scrolling tab you will see there is a default amount of lines to be displayed (probably something like 512). Under that, you will see “Unlimited“, so check that, and from the next command on-wards you won’t have that limitation any more.