private Connection getConnection(final ICommandLine cl) throws SQLException, InstantiationException, IllegalAccessException,
            ClassNotFoundException {
        DriverManager.registerDriver((Driver) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance());

        LOG.debug(getContext(), "Connecting to " + cl.getOptionValue("db") + "@" + cl.getOptionValue("server"));

        return DriverManager.getConnection("jdbc:oracle:thin:@" + cl.getOptionValue("server") + ":" + cl.getOptionValue("port", "1521")
                + ":" + cl.getOptionValue("db"), cl.getOptionValue("username"), cl.getOptionValue("password"));
    }
private Connection getConnection ( final ICommandLine cl ) throws SQLException , InstantiationException , IllegalAccessException , ClassNotFoundException { DriverManager . registerDriver ( ( Driver ) Class . forName ( "oracle.jdbc.driver.OracleDriver" ) . newInstance ( ) ) ; LOG . debug ( getContext ( ) , "Connecting to " + cl . getOptionValue ( "db" ) + "@" + cl . getOptionValue ( "server" ) ) ; return DriverManager . getConnection ( "jdbc:oracle:thin:@" + cl . getOptionValue ( "server" ) + ":" + cl . getOptionValue ( "port" , "1521" ) + ":" + cl . getOptionValue ( "db" ) , cl . getOptionValue ( "username" ) , cl . getOptionValue ( "password" ) ) ; }
Connects to the database.

@param cl
The plugin command line as received by JNRPE
@return The connection to the database
@throws SQLException
-
@throws InstantiationException
-
@throws IllegalAccessException
-
@throws ClassNotFoundException
-