public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if(getUser() != null) { addWarn("Ignoring property [user] with value ["+getUser()+"] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
/** * @see org.apache.log4j.spi.OptionHandler#activateOptions() */ public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public void start() { if (jndiLocation == null) { addError("No JNDI location specified for JNDIConnectionSource."); } discoverConnectionProperties(); }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if (getUser() != null) { addWarn("Ignoring property [user] with value [" + getUser() + "] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if (getUser() != null) { addWarn("Ignoring property [user] with value [" + getUser() + "] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if (getUser() != null) { addWarn("Ignoring property [user] with value [" + getUser() + "] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
/** * @see org.apache.log4j.db.ConnectionSource#getConnection() */ public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if (getUser() == null) { conn = dataSource.getConnection(); } else { conn = dataSource.getConnection(getUser(), getPassword()); } } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if(getUser() != null) { addWarn("Ignoring property [user] with value ["+getUser()+"] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if(getUser() != null) { addWarn("Ignoring property [user] with value ["+getUser()+"] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }
public Connection getConnection() throws SQLException { Connection conn = null; try { if (dataSource == null) { dataSource = lookupDataSource(); } if(getUser() != null) { addWarn("Ignoring property [user] with value ["+getUser()+"] for obtaining a connection from a DataSource."); } conn = dataSource.getConnection(); } catch (final NamingException ne) { addError("Error while getting data source", ne); throw new SQLException("NamingException while looking up DataSource: " + ne.getMessage()); } catch (final ClassCastException cce) { addError("ClassCastException while looking up DataSource.", cce); throw new SQLException("ClassCastException while looking up DataSource: " + cce.getMessage()); } return conn; }