public void removeDataSource ( String name ) throws ExpressionException , SecurityException { checkWriteAccess ( ) ; // check parameters if ( name == null || name . length ( ) == 0 ) throw new ExpressionException ( "name for Datasource Connection can be a empty value" ) ; Element datasources = _getRootElement ( "data-sources" ) ; Element [ ] children = XMLConfigWebFactory . getChildren ( datasources , "data-source" ) ; for ( int i = 0 ; i < children . length ; i ++ ) { String n = children [ i ] . getAttribute ( "name" ) ; if ( n != null && n . equalsIgnoreCase ( name ) ) { datasources . removeChild ( children [ i ] ) ; } } }
remove a DataSource Connection