use of org.teiid.core.util.MixinProxy in project teiid by teiid.
the class JDBCExecutionFactory method getDialect.
public SQLDialect getDialect() {
if (dialect == null) {
String name = getHibernateDialectClassName();
if (name != null) {
try {
Object impl = ReflectionHelper.create(name, null, this.getClass().getClassLoader());
InvocationHandler handler = new MixinProxy(new Object[] { impl });
this.dialect = (SQLDialect) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class<?>[] { SQLDialect.class }, handler);
} catch (TeiidException e) {
// $NON-NLS-1$
LogManager.logDetail(LogConstants.CTX_CONNECTOR, e, name, "could not be loaded");
}
}
if (dialect == null) {
dialect = new DefaultSQLDialect();
}
}
return dialect;
}
Aggregations