2 Replies Latest reply on Feb 14, 2007 1:42 PM by Weston M. Price

    JBOSS to DB2 AS400 - dateFormat is not correct

    Richard Angelo Newbie

      I am migrating an existing web application ( no ejbs ) from Websphere to JBOSS. Our database is DB2 on the AS400. In our Websphere environment, we had to set a custom property of the datasource, the dateFormat to "iso" in order to display the dates correctly. After moving the apps over to JBOSS, we are having the same problem. I tried to pass this property as a connection-property, ala <connection-property name="dateFormat">iso</connection-property> but it doesn't seem to make a difference.

      I also tried to add it to the connection-url string, as I see some other properties appended, but that has no effect either. Otherwise, the datasource works fine.

      Anyone else have any experience with this issue (dateFormat) ?

      Here is my db2-400-ds.xml file

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->

      <!-- $Id: db2-400-ds.xml,v 2004/10/27 18:44:10 pilhuhn Exp $ -->

      <!-- You need the jt400.jar that is delivered with IBM iSeries Access or the
      OpenSource Project jtopen.

      [systemname] Hostame of the iSeries
      [schema] Default schema is needed so jboss could use metadat to test if the tables exists

      <connection-url>jdbc:as400://WWTEST/WWTEST;extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>

      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      <connection-property name="dateFormat">iso</connection-property>
      <connection-property name="naming">system</connection-property>
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->