ex = e;
response = "".getBytes();
}
if (true) { // TODO add here the possibility to block sending of messages
I_ChangePublisher momEngine = (I_ChangePublisher)this.info.getObject("org.xmlBlaster.contrib.dbwriter.mom.MomEventEngine");
if (momEngine == null)
throw new Exception("ReplicationWriter: the momEngine used can not handle publishes");
String statementId = getStringAttribute(STATEMENT_ID_ATTR, null, description);
String sqlTopic = getStringAttribute(SQL_TOPIC_ATTR, null, description);
HashMap map = new HashMap();
map.put(STATEMENT_ID_ATTR, statementId);
if (ex != null)
map.put(ReplicationConstants.EXCEPTION_ATTR, ex.getMessage());
momEngine.publish(sqlTopic, response, map);
}
else
log.info("statement '" + sql + "' resulted in response '" + new String(response));
if (ex != null) // now that we notified the server we can throw the exception
throw ex;