protected IPentahoConnection getConnection( final File hbmCfgFile, final String[] classNames ) {
IPentahoConnection conn = null;
try {
conn = (HQLConnection) PentahoConnectionFactory.getConnection( "HQL", getSession(), this ); //$NON-NLS-1$
HQLConnection hconn = (HQLConnection) conn;
hconn.setConfigFile( hbmCfgFile );
hconn.setClassNames( classNames );
return conn;
} catch ( Exception e ) {
error( Messages.getInstance().getErrorString(
"HQLBaseComponent.ERROR_0009_COULD_NOT_ESTABLISH_CONNECTION", getActionName() ), e ); //$NON-NLS-1$
}