src/main/java/org/jboss/loom/utils/as7/AS7CliUtils.java
public static String findJdbcDriverUsingModule( String driverModuleName, ModelControllerClient as7Client ) throws IOException {
        
        ModelNode query = parseCommand("/subsystem=datasources/:read-attribute(name=installed-drivers)");
        ModelNode driversNode = as7Client.execute( query );
        driversNode = driversNode.get("result");
        for( ModelNode modelNode : driversNode.asList() ) {
            if( modelNode.get("driver-module-name").asString().equals( driverModuleName ) )
                return modelNode.get("driver-name").asString();
        }
        return null;
    }
/**
     *  Returns the name of JDBC driver which uses given module.
     * 
        /subsystem=datasources/:read-attribute(name=installed-drivers)
        {
            "outcome" => "success",
            "result" => [{
                "driver-name" => "h2",
                "deployment-name" => undefined,
                "driver-module-name" => "com.h2database.h2",
                "module-slot" => "main",
                "driver-datasource-class-name" => "",
                "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",
                "driver-class-name" => "org.h2.Driver",
                "driver-major-version" => 1,
                "driver-minor-version" => 3,
                "jdbc-compliant" => true
            }]
        }
     */
Returns the name of JDBC driver which uses given module.


Returns the name of JDBC driver which uses given module .
public static String findJdbcDriverUsingModule( String driverModuleName, ModelControllerClient as7Client ) throws IOException {
        ModelNode query = parseCommand("/subsystem=datasources/:read-attribute(name=installed-drivers)");
        ModelNode driversNode = as7Client.execute( query );
        driversNode = driversNode.get("result");
        for( ModelNode modelNode : driversNode.asList() ) {
            if( modelNode.get("driver-module-name").asString().equals( driverModuleName ) )
                return modelNode.get("driver-name").asString();
        }
        return null;
    }
public static String findJdbcDriverUsingModule ( String driverModuleName , ModelControllerClient as7Client ) throws IOException { ModelNode query = parseCommand ( "/subsystem=datasources/:read-attribute(name=installed-drivers)" ) ; ModelNode driversNode = as7Client . execute ( query ) ; driversNode = driversNode . get ( "result" ) ; for ( ModelNode modelNode : driversNode . asList ( ) ) { if ( modelNode . get ( "driver-module-name" ) . asString ( ) . equals ( driverModuleName ) ) return modelNode . get ( "driver-name" ) . asString ( ) ; } return null ; }
Returns the name of JDBC driver which uses given module.
Returns the name of JDBC driver which uses given module .