public void close() throws Exception { try {super.close();} finally {home.checkinBundle(returnMe);} } }
public ConnectionBundlePoolImpl(String jdbcUrl, String username, String pwd, int start, int max, int inc) throws SQLException { super(start, max, inc); init(jdbcUrl, username, pwd); }
public boolean hasNext() throws SQLException { ratchet(); return (available == 1); }
private void synchronousDestroyStatement( final Object pstmt ) { StatementUtils.attemptClose( (PreparedStatement) pstmt ); }
public Object next() throws SQLException { ratchet(); Object out = objectFromResultSet(rs); clear(); return out; }
protected Object acquireResource() throws Exception { Connection con = DriverManager.getConnection(jdbcUrl, username, pwd); setConnectionOptions(con); return new ConnectionBundleImpl(con); }
public void createSchema(Connection con) throws SQLException {doStatementList(createStmts, con);}
public void init(String jdbcUrl, String username, String pwd, int start, int max, int inc) throws SQLException { this.inner = new InnerPool(jdbcUrl, username, pwd, start, max, inc); }
InnerPool(String jdbcUrl, String username, String pwd, int start, int max, int inc) throws SQLException { super(start, max, inc); //ConnectionBundlePoolBean.this is not set until //after superconstructor has completed, so we must //put off init() this.init(jdbcUrl, username, pwd); }
public ConnectionBundle checkoutBundle() throws SQLException, InterruptedException, BrokenObjectException { return inner.checkoutBundle(); }
protected void setConnectionOptions(Connection con) throws SQLException { ConnectionBundlePoolBean.this.setConnectionOptions( con ); } }
public void checkinBundle(ConnectionBundle bndl) throws BrokenObjectException {this.checkinResource(bndl);}
public void checkinBundle(ConnectionBundle bndl) throws SQLException, BrokenObjectException { inner.checkinBundle(bndl); }
public XmlSchema(InputStream xmlStream) throws SAXException, IOException, ParserConfigurationException {parse(xmlStream);}
protected void destroyResource(Object resc) throws Exception {((ConnectionBundle) resc).close();}
public void close() throws SQLException { inner.close(); }
public void finalize() throws Exception {if (rs != null) this.close();}
private void synchronousDestroyStatement( final Object pstmt ) { StatementUtils.attemptClose( (PreparedStatement) pstmt ); }
public void dropSchema(Connection con) throws SQLException {doStatementList(dropStmts, con);}
final void synchronousDestroyStatement( final Object pstmt ) { StatementUtils.attemptClose( (PreparedStatement) pstmt ); }