protected void linkDataSourceToConfigXml(DataSource ds){
  Document configXml=readConfigXml();
  Element domain=configXml.getDocumentElement();
  addDataSourceToDomain(ds,domain);
  writeConfigXml(configXml);
}

protected void linkDataSourceToConfigXml ( DataSource ds ) { Document configXml = readConfigXml ( ) ; Element domain = configXml . getDocumentElement ( ) ; addDataSourceToDomain ( ds , domain ) ; writeConfigXml ( configXml ) ; }
this will add a reference to an externally defined datasource file into the config . xml file .
