public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getDatasourceInfo(helperName); if (datasourceInfo.inlineJdbcElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } } }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.jndiJdbcElement != null) { Element jndiJdbcElement = datasourceInfo.jndiJdbcElement; String jndiName = jndiJdbcElement.getAttribute("jndi-name"); String jndiServerName = jndiJdbcElement.getAttribute("jndi-server-name"); Connection con = getJndiConnection(jndiName, jndiServerName); if (con != null) return con; } if (datasourceInfo.inlineJdbcElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { //no real need to print an error here return null; } }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getDatasourceInfo(helperName); if (datasourceInfo.jndiJdbcElement != null) { Element jndiJdbcElement = datasourceInfo.jndiJdbcElement; String jndiName = jndiJdbcElement.getAttribute("jndi-name"); String jndiServerName = jndiJdbcElement.getAttribute("jndi-server-name"); Connection con = getJndiConnection(jndiName, jndiServerName); if (con != null) return con; } else { Debug.logError("JNDI loaded is the configured transaction manager but no jndi-jdbc element was specified in the " + helperName + " datasource. Please check your configuration; will try other sources"); } if (datasourceInfo.inlineJdbcElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { //no real need to print an error here return null; } }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.inlineJdbcElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } } }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.getJndiDatasource() != null) { JndiDatasourceInfo jndiDatasource = datasourceInfo.getJndiDatasource(); Connection con = null; try { con = getJndiConnection(helperName, jndiDatasource.getJndiName(), jndiDatasource.getJndiServerName()); } catch (AbstractMethodError err) { log.warn("*********************************************** IMPORTANT ************************************************"); log.warn(" "); log.warn(" We found that you may experience problems with database connectivity because your database driver "); log.warn(" is not fully JDBC 4 compatible. As a workaround of this problem we suggest adding a validation query "); log.warn(" to your database resource configuration in Tomcat's server.xml file:\n"); log.warn(" validationQuery=\"select 1;\" \n"); log.warn(" or to update your database driver to version which fully supports JDBC 4. "); log.warn(" More information about this problem can be found here: https://jira.atlassian.com/browse/JRA-59768 "); log.warn(" "); log.warn("***********************************************************************************************************"); } if (con != null) return con; } if (datasourceInfo.getJdbcDatasource() != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); return otherCon; } else { //no real need to print an error here return null; } }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { final DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.getJdbcDatasource() == null) { Debug.logError("Dumb/Empty is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } return ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); }
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getDatasourceInfo(helperName); if (datasourceInfo.inlineJdbcElement != null) { // Use JOTM (enhydra-jdbc.jar) connection pooling try { Connection con = JotmConnectionFactory.getConnection(helperName, datasourceInfo.inlineJdbcElement); if (con != null) return con; } catch (Exception ex) { Debug.logError(ex, "JOTM is the configured transaction manager but there was an error getting a database Connection through JOTM for the " + helperName + " datasource. Please check your configuration, class path, etc."); } Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { Debug.logError("JOTM is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } } }
Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else if (datasourceInfo.tyrexDataSourceElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else {
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { EntityConfigUtil.DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.inlineJdbcElement != null) { // Use JOTM (enhydra-jdbc.jar) connection pooling try { Connection con = JotmConnectionFactory.getConnection(helperName, datasourceInfo.inlineJdbcElement); if (con != null) return con; } catch (Exception ex) { Debug.logError(ex, "JOTM is the configured transaction manager but there was an error getting a database Connection through JOTM for the " + helperName + " datasource. Please check your configuration, class path, etc."); } Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else { Debug.logError("JOTM is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } } }
Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else if (datasourceInfo.tyrexDataSourceElement != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); return otherCon; } else {
return ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); } else {
return ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.inlineJdbcElement); } else {
public Connection getConnection(String helperName) throws SQLException, GenericEntityException { DatasourceInfo datasourceInfo = EntityConfigUtil.getInstance().getDatasourceInfo(helperName); if (datasourceInfo.getJdbcDatasource() != null) { // Use JOTM (enhydra-jdbc.jar) connection pooling try { Connection con = JotmConnectionFactory.getConnection(helperName, datasourceInfo.getJdbcDatasource()); if (con != null) return con; } catch (Exception ex) { Debug.logError(ex, "JOTM is the configured transaction manager but there was an error getting a database Connection through JOTM for the " + helperName + " datasource. Please check your configuration, class path, etc."); } Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); return otherCon; } else { Debug.logError("JOTM is the configured transaction manager but no inline-jdbc element was specified in the " + helperName + " datasource. Please check your configuration"); return null; } }
Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); return otherCon; } else if (datasourceInfo.getTyrexDataSourceElement() != null) { Connection otherCon = ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); return otherCon; } else {
return ConnectionFactory.tryGenericConnectionSources(helperName, datasourceInfo.getJdbcDatasource()); } else {