public function createConnection(string $dsn, string $driverClass = 'com.mysql.jdbc.Driver'): Interfaces\JavaObject
    {
        if (!is_string($dsn) || trim($dsn) == '') {
            $message = 'DSN param must be a valid (on-empty) string';
            throw new Exception\InvalidArgumentException(__METHOD__.' '.$message);
        }

        $class = $this->ba->javaClass('java.lang.Class');
        try {
            $class->forName($driverClass);
        } catch (Exception\JavaException $e) {
            throw $e;
        }

        try {
            $conn = $this->getDriverManager()->getConnection($dsn);
        } catch (Exception\JavaExceptionInterface $e) {
            throw $e;
        }

        return $conn;
    }