Mohan's fix for ESBJAVA-2435

Please apply following patch by Mohan (https://wso2.org/jira/browse/ESBJAVA-2435)