4 Replies Latest reply on Aug 8, 2002 11:37 AM by tsangcn

    How to set vendor specific properties in Datasource in JBoss

    tsangcn

      I am very disappointed with JBoss on this area.

      My main target is to set the charSet=UTF8 in Interbase/Firebird.

      In JBoss 2.4.4, it is OK. I can put properties in the Property attribute in jboss.jcml.

      But when I upgraded JBoss to 2.4.6 or 2.4.7. It failes. It seems that from 2.4.6 it must have the JDBCuser and password attributes set in jboss.jcml. But it seems that I must set charSet=UTF8;user=sysdba;password=masterkey in the property attribute in jboss.jcml. So my nightmare comes. All the UTF8 encoding chracters in my Firebird database becomes garbages.

      I try JBoss 3.0.0 and FirebirdSQL. The same, I found no way to process the UTF8 characters.

      I found many people in the forum commented JBoss3.0.0 and FirebirdSQL can be an enterprise solution. But in terms of globalization, unicode character processing is very important. Java already handle unicode characters. But the unicode support in Interbase/Firebird, to my opinium, is quite WEAK!!

      Now, I found that JBoss 3.0.0 and 3.0.1 will not support vendor specific properties until 3.1.0. To me, it seems a long way, and I don't know at that moment will it support unicode from Firebird.

      The JBoss web site encourage people to sell JBoss to our boss. But now my boss keep asking me "Where is all the unicode characters?"
      Anybody's help is very appreciated.
      Otherwise maybe I just tell me boss to spell money to buy a WebSphere and DB2 combination.

      Thanks a lot.

        • 1. Re: How to set vendor specific properties in Datasource in J
          davidjencks

          This would be a very easy patch to the firebirdsql driver. You just need to add a get/set CharSet attribute to FBManagedConnectionFactory and do whatever is necessary to get the supplied value into an appropriate spot in the defaultCri. Setting the charset already works when getting the connections from FBDriver. If you have any problems, please ask on the firebird-java list, the developers who added charset support to the driver will see it and can help.

          Since you are already trying using unicode in Firebird, you would be in an ideal spot to test such a patch. If you write it please submit it to the firebird-java list or the patch tracker at firebird, and it will get applied quickly. I'm a bit reluctant to write it myself since I'm not very familiar with the character set support in firebird and am not sure I could test it well.

          • 2. Re: How to set vendor specific properties in Datasource in J
            rrokytskyy

            I already patched the driver. Property is called Encoding, not CharSet. This was done because InterClient driver accepts "charSet" property, but values are different from ones that are used in Firebird type 4 JDBC/JCA driver.

            • 3. Re: How to set vendor specific properties in Datasource in J
              tsangcn

              Thank you David.

              I have download new patch from firebird CVS, then build a new firebirdsql.rar. Its OK now. The UNICODE characters come back to normal. They have add a new config-property to Firebird-service.xml to specify the encoding.

              Add the following to the Firebird-service.xml for UNICODE support

              <config-property>
              <config-property-name>Encoding</config-property-name>
              <config-property-type>java.lang.String</config-property-type>
              <config-property-value>UNICODE_FSS</config-property-value>
              </config-property>
              Also, with the new patch, the Database property can be specify with the old format as

              localhost/3050:/home/databases/sample.gdb

              or use the standard jdbc format as

              //localhost//home/databases/sample.gdb

              Thanks.
              CN

              • 4. Re: How to set vendor specific properties in Datasource in J
                tsangcn

                Thank you David.

                I have download new patch from firebird CVS, then build a new firebirdsql.rar. Its OK now. The UNICODE characters come back to normal. They have add a new config-property to Firebird-service.xml to specify the encoding.

                Add the following to the Firebird-service.xml for UNICODE support

                <config-property>
                <config-property-name>Encoding</config-property-name>
                <config-property-type>java.lang.String</config-property-type>
                <config-property-value>UNICODE_FSS</config-property-value>
                </config-property>
                Also, with the new patch, the Database property can be specify with the old format as

                localhost/3050:/home/databases/sample.gdb

                or use the standard jdbc format as

                //localhost//home/databases/sample.gdb

                Thanks.
                CN