In looking at the source code, I think I see why there may be a problem:

      else if(typeCode == XS_DATETIME)
  |       {
  |          Calendar c;
  |          if(value.getClass() == java.util.Date.class)
  |          {
  |             c = Calendar.getInstance();
  |             c.clear();
  |             c.setTime((java.util.Date)value);
  |          }
  |          else
  |          {
  |             c = (Calendar)value;
  |          }
  |          result = marshalDateTime(c);
  |       }

The SybaseTimestamp class extends java.sql.Timestamp which in turn extends 
java.util.Date.  That first 'if' should hit, but it won't because 
SybaseTimestamp.class != java.util.Date.class.  Instead, I think the if 
statement should be:

if(java.util.Date.class.isAssignableFrom(value.getClass()))

Please let me know if this is indeed a bug and I will take out a JIRA issue.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935876#3935876

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935876


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to