private String substituteDbName(String url,String db){
  Properties jProps=new Properties();
  jProps.setProperty("URL",url);
  if (db != null)   jProps.setProperty("DBNAME",db);
  TungstenProperties.substituteSystemValues(jProps);
  return jProps.getProperty("URL");
}

private String substituteDbName ( String url , String db ) { Properties jProps = new Properties ( ) ; jProps . setProperty ( "URL" , url ) ; if ( db != null ) jProps . setProperty ( "DBNAME" , db ) ; TungstenProperties . substituteSystemValues ( jProps ) ; return jProps . getProperty ( "URL" ) ; }
in url substitute the database name to avoid errors .
