[jboss-dev-forums] [JBoss ESB Development] - Sql-provider validation seems invalid

Simon Toftegård Petersen do-not-reply at jboss.com
Wed Aug 18 09:03:27 EDT 2010


Simon Toftegård Petersen [http://community.jboss.org/people/simontp] created the discussion

"Sql-provider validation seems invalid"

To view the discussion, visit: http://community.jboss.org/message/557912#557912

--------------------------------------------------------------
Im using jboss-soa-p.4.3.0-cp02 and discovered something strange about sql-provider. Looking through the source code i found that it validates input through soa-work\esb\checkout\product\rosetta\src\org\jboss\soa\esb\listeners\config\XmlValidatorImpl.java with this schema: soa-work\esb\checkout\product\etc\schemas\xml\jbossesb-1.0.1.xsd
Where <xsd:element name="sql-message-filter"> is defined but only a fraction of the parameters that is actually available are there. Cause if you look in soa-work\esb\checkout\product\rosetta\src\org\jboss\soa\esb\listeners\gateway\SqlTableGatewayListener.java it has alot more parameters that it looks for:


    /** SQL related  */
Compiled list of possible configvalues(compiled from ListenerTagNames.java and JDBCEpr.java)
 public static final String SQL_TABLE_NAME_TAG = "tableName";  
 public static final String MESSAGE_ID_COLUMN_TAG  = "message_id_column";
 public static final String DATA_COLUMN_TAG  = "message_column";   
 public static final String STATUS_COLUMN_TAG  = "status_column";
 public static final String SQL_WHERE_CONDITION_TAG = "whereCondition";
 public static final String ORDER_BY_TAG = "orderBy";
 public static final String TIMESTAMP_COLUMN_TAG  = "insert_timestamp_column";
 public static final String POST_DEL_TAG = "postDelete";
  public static final String ERROR_DEL_TAG = "errorDelete";

 public static final String SQL_SELECT_FIELDS_TAG = "selectFields";
 public static final String SQL_KEY_FIELDS_TAG = "keyFields";
 public static final String SQL_IN_PROCESS_FIELD_TAG = "inProcessField";
 public static final String SQL_IN_PROCESS_VALUES_TAG = "inProcessValues";

jbossesb-1.0.1.xsd(validation): 
<xsd:attribute name="tablename" type="xsd:string"
<xsd:attribute name="message-id-column"
<xsd:attribute name="message-column"
<xsd:attribute name="status-column"
<xsd:attribute name="where-condition" use="optional"
<xsd:attribute name="order-by" use="optional"
<xsd:attribute name="insert-timestamp-column" use="optional"
<xsd:attribute default="true" name="post-delete"
<xsd:attribute default="true" name="error-delete"

As you can see 4 option are missing in the validation. So these can't be used at all. Is this a bug or is it working as intended?





Here is my jboss-esb.xml sql-provider just for reference:

<sql-provider name="GatewaySQLprovider"
url="jdbc:oracle:thin:@jdbc:oracle:thin:@url"
datasource="java:/HelloworldTxSqlDB">
<sql-bus busid="helloSQLChannel">
<sql-message-filter tablename="gateway_table"
status-column="STATUS_COL" order-by="DATA_COLUMN" where-condition="DATA_COLUMN like 'data%'"
message-column="DATA_COLUMN" post-delete="false" message-id-column="UNIQUE_ID"
insert-timestamp-column="TIMESTAMP_COL" error-delete="false" select-fields="DATA_COLUMN" />
</sql-bus>
</sql-provider>

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/557912#557912]

Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20100818/ed17a24a/attachment.html 


More information about the jboss-dev-forums mailing list