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, setAutoCommit
public void select(XQueue xq) throws java.sql.SQLException, javax.jms.JMSException
java.sql.SQLException
javax.jms.JMSException
public void loadReference() throws java.io.IOException
java.io.IOException
protected void saveReference() throws java.io.IOException
java.io.IOException
public void query(XQueue xq) throws java.sql.SQLException, TimeoutException
java.sql.SQLException
TimeoutException
public void update(XQueue xq) throws java.sql.SQLException, TimeoutException, javax.jms.JMSException
java.sql.SQLException
TimeoutException
javax.jms.JMSException
public void list(XQueue xq) throws java.sql.SQLException, TimeoutException
java.sql.SQLException
TimeoutException
protected 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.SQLException
javax.jms.JMSException
protected 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.SQLException
javax.jms.JMSException
public java.lang.String reconnect()
reconnect
in interface Connector
reconnect
in class DBConnector
public void acknowledge(long[] state) throws javax.jms.JMSException
javax.jms.JMSException
public void destroyObject(java.lang.Object obj)
public void close()
close
in interface Connector
close
in class DBConnector
public java.lang.String getOperation()