ejb3/src/main/java/org/jboss/as/ejb3/timerservice/persistence/database/DatabaseTimerPersistence.java
private String identifyDialect(String name) {
        String unified = null;

        if (name != null) {
            if (name.toLowerCase().contains("postgres")) {
               unified = "postgresql";
            } else if (name.toLowerCase().contains("mysql")) {
                unified = "mysql";
            } else if (name.toLowerCase().contains("mariadb")) {
                unified = "mariadb";
            } else if (name.toLowerCase().contains("db2")) {
                unified = "db2";
            } else if (name.toLowerCase().contains("hsql") || name.toLowerCase().contains("hypersonic")) {
                unified = "hsql";
            } else if (name.toLowerCase().contains("h2")) {
                unified = "h2";
            } else if (name.toLowerCase().contains("oracle")) {
                unified = "oracle";
            }else if (name.toLowerCase().contains("microsoft")) {
                unified = "mssql";
            }else if (name.toLowerCase().contains("jconnect")) {
                unified = "sybase";
            }
         }
        EjbLogger.EJB3_TIMER_LOGGER.debugf("Check dialect for '%s', result is '%s'", name, unified);
        return unified;
    }
private String identifyDialect(String name) {
        String unified = null;

        if (name != null) {
            if (name.toLowerCase().contains("postgres")) {
               unified = "postgresql";
            } else if (name.toLowerCase().contains("mysql")) {
                unified = "mysql";
            } else if (name.toLowerCase().contains("mariadb")) {
                unified = "mariadb";
            } else if (name.toLowerCase().contains("db2")) {
                unified = "db2";
            } else if (name.toLowerCase().contains("hsql") || name.toLowerCase().contains("hypersonic")) {
                unified = "hsql";
            } else if (name.toLowerCase().contains("h2")) {
                unified = "h2";
            } else if (name.toLowerCase().contains("oracle")) {
                unified = "oracle";
            }else if (name.toLowerCase().contains("microsoft")) {
                unified = "mssql";
            }else if (name.toLowerCase().contains("jconnect")) {
                unified = "sybase";
            }
         }
        EjbLogger.EJB3_TIMER_LOGGER.debugf("Check dialect for '%s', result is '%s'", name, unified);
        return unified;
    }
private String identifyDialect ( String name ) { String unified = null ; if ( name != null ) { if ( name . toLowerCase ( ) . contains ( "postgres" ) ) { unified = "postgresql" ; } else if ( name . toLowerCase ( ) . contains ( "mysql" ) ) { unified = "mysql" ; } else if ( name . toLowerCase ( ) . contains ( "mariadb" ) ) { unified = "mariadb" ; } else if ( name . toLowerCase ( ) . contains ( "db2" ) ) { unified = "db2" ; } else if ( name . toLowerCase ( ) . contains ( "hsql" ) || name . toLowerCase ( ) . contains ( "hypersonic" ) ) { unified = "hsql" ; } else if ( name . toLowerCase ( ) . contains ( "h2" ) ) { unified = "h2" ; } else if ( name . toLowerCase ( ) . contains ( "oracle" ) ) { unified = "oracle" ; } else if ( name . toLowerCase ( ) . contains ( "microsoft" ) ) { unified = "mssql" ; } else if ( name . toLowerCase ( ) . contains ( "jconnect" ) ) { unified = "sybase" ; } } EjbLogger . EJB3_TIMER_LOGGER . debugf ( "Check dialect for '%s', result is '%s'" , name , unified ) ; return unified ; }
Use the given name and check for different database types to have a unified identifier for the dialect

@param name A database name or even a driver name which should include the database name
@return A unified dialect identifier
Use the given name and check for different database types to have a unified identifier for the dialect