refactoring, xa datasources improvements

refactoring, xa datasources improvements