org.xmlBlaster.util.queue.jdbc
Class PreparedQuery
java.lang.Object
org.xmlBlaster.util.queue.jdbc.PreparedQuery
class PreparedQuery
- extends java.lang.Object
- Author:
- Michele Laghi
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WITH_FAILURES
public static final boolean WITH_FAILURES
- See Also:
- Constant Field Values
SUCCESS
public static final boolean SUCCESS
- See Also:
- Constant Field Values
ME
public static final java.lang.String ME
- See Also:
- Constant Field Values
log
private static java.util.logging.Logger log
conn
java.sql.Connection conn
st
private java.sql.Statement st
rs
java.sql.ResultSet rs
pool
private JdbcConnectionPool pool
isClosed
private boolean isClosed
isException
private boolean isException
PreparedQuery
public PreparedQuery(JdbcConnectionPool pool,
java.lang.String request,
boolean isAutoCommit,
int fetchSize)
throws java.sql.SQLException,
XmlBlasterException
- This constructor can be used if you want to have several invocations
whitin the same transaction.
- Parameters:
pool
- The JdbcConnectionPool to use for this prepared quueryrequest
- the string to use as the requestisAutoCommit
- log
- fetchSize
-
- Throws:
java.sql.SQLException
XmlBlasterException
PreparedQuery
public PreparedQuery(JdbcConnectionPool pool,
java.lang.String request,
int fetchSize)
throws java.sql.SQLException,
XmlBlasterException
- Throws:
java.sql.SQLException
XmlBlasterException
closeStatement
public void closeStatement()
inTransactionRequest
public final java.sql.ResultSet inTransactionRequest(java.lang.String request)
throws XmlBlasterException,
java.sql.SQLException
- Throws:
XmlBlasterException
java.sql.SQLException
close
public final void close(boolean success)
throws XmlBlasterException,
java.sql.SQLException
- Close the connection.
Note that this method must always be invoked since it handles both
rollback and commit transparently (i.e. in case of a previous exception
it makes a rollback, otherwise a commit in case the flag isAutoCommit
is false.
- Throws:
XmlBlasterException
java.sql.SQLException
finalize
public void finalize()
- TODO this method should not be needed. Check if close is really always invoked.
- Overrides:
finalize
in class java.lang.Object
Copyright © 1999-2014 The xmlBlaster.org contributers.