xmlBlaster 2.2.0 API

org.xmlBlaster.util.queue.jdbc
Class PreparedQuery

java.lang.Object
  extended by org.xmlBlaster.util.queue.jdbc.PreparedQuery

 class PreparedQuery
extends java.lang.Object

Author:
Michele Laghi

Field Summary
(package private)  java.sql.Connection conn
           
private  boolean isClosed
           
private  boolean isException
           
private static java.util.logging.Logger log
           
static java.lang.String ME
           
private  JdbcConnectionPool pool
           
(package private)  java.sql.ResultSet rs
           
private  java.sql.Statement st
           
static boolean SUCCESS
           
static boolean WITH_FAILURES
           
 
Constructor Summary
PreparedQuery(JdbcConnectionPool pool, java.lang.String request, boolean isAutoCommit, int fetchSize)
          This constructor can be used if you want to have several invocations whitin the same transaction.
PreparedQuery(JdbcConnectionPool pool, java.lang.String request, int fetchSize)
           
 
Method Summary
 void close(boolean success)
          Close the connection.
 void closeStatement()
           
 void finalize()
          TODO this method should not be needed.
 java.sql.ResultSet inTransactionRequest(java.lang.String request)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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 quuery
request - the string to use as the request
isAutoCommit -
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
Method Detail

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

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.