public class JDBCMessenger extends DBConnector
resultType, sqlExecTimeout, uri| Constructor and Description |
|---|
JDBCMessenger(java.util.Map props) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(long[] state)
checks in the prepared statement and removes the asset for the result set
|
void |
close() |
void |
destroyObject(java.lang.Object obj) |
java.lang.String |
getOperation() |
protected static int |
getResult(int type,
java.sql.ResultSet rset,
java.lang.String key,
byte[] buffer,
javax.jms.BytesMessage msg)
It retrieves BLOB data or LONGVARBINARY data as well as other data from
the resultset and puts them into the BytesMessage.
|
void |
list(XQueue xq)
It listens to an XQueue for incoming JMS messages and extracts a pattern
for table names or a specific table name, and content filters from each
message.
|
void |
loadReference()
loads the state parameters from the reference file
|
void |
query(XQueue xq)
It listens to an XQueue for incoming JMS messages and extracts the
SQL statement and data from each message.
|
java.lang.String |
reconnect()
reconnects to the DB and returns null on success or err msg otherwise
|
protected void |
saveReference()
flushes the current reference info to a given file for tracking the
browser state if the ReferenceFile is defined.
|
void |
select(XQueue xq)
It executes the predfined SQL statement and puts the result to the body
of a new message.
|
protected int |
setParameters(java.lang.String sqlStr,
java.sql.PreparedStatement ps,
java.lang.String msgStr,
javax.jms.Message msg)
It sets parameters with the data from the message
|
void |
update(XQueue xq)
It listens to the XQueue for incoming JMS messages and extracts the
SQL statement and data from each message.
|
commit, copyStream, copyStream, executeQuery, getURI, isConnected, list, list, list, main, prepareStatement, rollback, select, setAutoCommitpublic void select(XQueue xq) throws java.sql.SQLException, javax.jms.JMSException
java.sql.SQLExceptionjavax.jms.JMSExceptionpublic void loadReference()
throws java.io.IOException
java.io.IOExceptionprotected void saveReference()
throws java.io.IOException
java.io.IOExceptionpublic void query(XQueue xq) throws java.sql.SQLException, TimeoutException
java.sql.SQLExceptionTimeoutExceptionpublic void update(XQueue xq) throws java.sql.SQLException, TimeoutException, javax.jms.JMSException
java.sql.SQLExceptionTimeoutExceptionjavax.jms.JMSExceptionpublic void list(XQueue xq) throws java.sql.SQLException, TimeoutException
java.sql.SQLExceptionTimeoutExceptionprotected int setParameters(java.lang.String sqlStr,
java.sql.PreparedStatement ps,
java.lang.String msgStr,
javax.jms.Message msg)
throws java.sql.SQLException,
javax.jms.JMSException
java.sql.SQLExceptionjavax.jms.JMSExceptionprotected static int getResult(int type,
java.sql.ResultSet rset,
java.lang.String key,
byte[] buffer,
javax.jms.BytesMessage msg)
throws java.sql.SQLException,
javax.jms.JMSException
java.sql.SQLExceptionjavax.jms.JMSExceptionpublic java.lang.String reconnect()
reconnect in interface Connectorreconnect in class DBConnectorpublic void acknowledge(long[] state)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void destroyObject(java.lang.Object obj)
public void close()
close in interface Connectorclose in class DBConnectorpublic java.lang.String getOperation()