public void addDialect(String dialectName,
String dialectClass) {
Class<?> cls = null;
try {
cls = getClassLoader().loadClass(dialectClass);
DialectConfiguration dialectConf = (DialectConfiguration) cls.newInstance();
dialectConf.init( this );
addDialect( dialectName,
dialectConf );
} catch ( Exception e ) {
throw new RuntimeException( "Unable to load dialect '" + dialectClass + ":" + dialectName + ":" + ((cls != null) ? cls.getName() : "null") + "'",
e );