[jboss-svn-commits] JBL Code SVN: r24972 - labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jan 28 08:38:13 EST 2009
Author: mark.little at jboss.com
Date: 2009-01-28 08:38:12 -0500 (Wed, 28 Jan 2009)
New Revision: 24972
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
Log:
https://jira.jboss.org/jira/browse/JBESB-2212
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2009-01-28 13:36:11 UTC (rev 24971)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/gateway/SqlTableGatewayListener.java 2009-01-28 13:38:12 UTC (rev 24972)
@@ -341,10 +341,13 @@
throw new ConfigurationException(
"A valid inProcessField attribute must be specified");
_timestamp = ListenerUtil.getValue(_config,
- JDBCEpr.TIMESTAMP_COLUMN_TAG, "");
- if (_timestamp.trim().length() < 1)
+ JDBCEpr.TIMESTAMP_COLUMN_TAG);
+ if ((_timestamp == null) || (_timestamp.trim().length() == 0))
+ {
_logger.debug("No value specified for: "
+ ListenerTagNames.SQL_TIMESTAMP_TAG);
+ _timestamp = null ;
+ }
_where = ListenerUtil.getValue(_config,
ListenerTagNames.SQL_WHERE_CONDITION_TAG, "");
if (_where.trim().length() < 1)
@@ -604,7 +607,7 @@
protected String updateStatement() {
StringBuilder sb = new StringBuilder().append("update ").append(
_tableName).append(" set ").append(_inProcessField).append(" = ? ");
- if (_timestamp.trim().length() < 1) {
+ if (_timestamp != null) {
sb.append(", " + _timestamp + " = ? ");
}
sb.append("where ").append(_inProcessField).append(" = ?");
@@ -701,7 +704,7 @@
try {
int iParm = 3;
- if (_timestamp.trim().length() < 1) {
+ if (_timestamp != null) {
iParm++;
}
@@ -734,7 +737,7 @@
try {
int counter = 1;
_PSupdate.setString(counter++, getStatus(toState));
- if (_timestamp.trim().length() < 1) {
+ if (_timestamp != null) {
Date now = new Date();
_PSupdate.setString(counter++, now.toString());
}
More information about the jboss-svn-commits
mailing list