fix for ESBJAVA-3271

Please check the changes in the "AbstractEndpoint" with https://wso2.org/jira/browse/ESBJAVA-2587