1 Reply Latest reply on Jan 7, 2002 1:01 PM by nemesis

    Persistence of Custom Data Types

    nemesis

      Hi,

      I am using MS SQLSERVER as my datasource and I made the following changes to my standardjaws.xml file:

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


      <!--
      java:/DefaultDS
      <type-mapping>Hypersonic SQL</type-mapping>
      false
      -->

      java:/SQLServerPool
      <type-mapping>MS SQLSERVER2000</type-mapping>
      false

      ===========

      I also made the following changes in the jboss.jcml,

      <!-- ==================================================================== -->
      <!-- JDBC -->
      <!-- ==================================================================== -->

      <!-- Add your JDBC Driver i.e. Microsoft JDBC for SQLServer here -->



      org.hsqldb.jdbcDriver,
      com.microsoft.jdbc.sqlserver.SQLServerDriver





      <!-- This is the setup for MSSQLServer Connection Pool -->


      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      SQLServerPool
      DatabaseName=PayeArchitecture;SelectMethod=cursor
      jdbc:microsoft:sqlserver://localhost:1433
      1200000
      paye
      richrules
      10
      false
      false
      false
      true
      120000
      1800000
      false
      false
      1.0
      0



      see if this might help.

      Gary

        • 1. Re: Persistence of Custom Data Types
          nemesis

          Just a followup:
          I found an "interim solution" by using a String type instead of my LongString type and mapping it as jdbc-type CLOB and sql-type TEXT (a mySQL type).
          The Jboss code apparently treats String as a "primitive" class and uses toString() instead of Serialization to store the field value.
          This way I managed to store the field without the Serialization signatures.
          I could have optionally patched the source to treat my LongString differently but that would be a "dirty" solution.

          Can anyone tell me if there are plans to support *custom* serialization of custom data types?

          Cheers,
          Nemesis