private String discoverDriverClassName(URLClassLoader urlClassLoader) throws IOException {
  String className=null;
  URL resource=urlClassLoader.findResource("META-INF/services/java.sql.Driver");
  if (resource != null) {
    BufferedReader br=null;
    try {
      br=new BufferedReader(new InputStreamReader(resource.openStream()));
      className=br.readLine();
    }
  finally {
      if (br != null) {
        br.close();
      }
    }
  }
  return className;
}

private String discoverDriverClassName ( URLClassLoader urlClassLoader ) throws IOException { String className = null ; URL resource = urlClassLoader . findResource ( "META-INF/services/java.sql.Driver" ) ; if ( resource != null ) { BufferedReader br = null ; try { br = new BufferedReader ( new InputStreamReader ( resource . openStream ( ) ) ) ; className = br . readLine ( ) ; } finally { if ( br != null ) { br . close ( ) ; } } } return className ; }
read class name from the service definition . reads from meta - inf / services / java . sql . driver
