private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }
private Connection getConnection() throws JspException, SQLException { // Fix: Add all other mechanisms Connection conn = null; isPartOfTransaction = false; TransactionTagSupport parent = (TransactionTagSupport) findAncestorWithClass(this, TransactionTagSupport.class); if (parent != null) { if (dataSourceSpecified) { throw new JspTagException( Resources.getMessage("ERROR_NESTED_DATASOURCE")); } conn = parent.getSharedConnection(); isPartOfTransaction = true; } else { if ((rawDataSource == null) && dataSourceSpecified) { throw new JspException( Resources.getMessage("SQL_DATASOURCE_NULL")); } DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource, pageContext); try { conn = dataSource.getConnection(); } catch (Exception ex) { throw new JspException( Resources.getMessage("DATASOURCE_INVALID", ex.toString())); } } return conn; }