4 Replies Latest reply on Aug 7, 2002 4:31 AM by tdang

    JBoss 3.0 & Interbase

    rkrcmar

      Hi,

      I Interbase database and I do not know how I connect it. Can anybody help me with this. I don't know where I find driver for Interbase and what I have write to *-service.xml.

      Thank very much.

        • 1. Re: JBoss 3.0 & Interbase
          tdang

          You find xxx-service.xml for a lot of database systems at:

          http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/

          I believe there is not a service for interbase yet, but you can download an exmaple service (e.g db2-service.xml) and modify:

          - your datasource name: DB2DS

          - the database name: <config-property name="ConnectionURL" type="java.lang.String">jdbc:db2:yourdatabase</config-property>

          - the jdbc driver for interbase: <config-property name="DriverClass" type="java.lang.String">COM.ibm.db2.jdbc.app.DB2Driver</config-property>

          - and your login information for your database:
          <config-property name="UserName" type="java.lang.String"></config-property>
          <config-property name="Password" type="java.lang.String"></config-property>


          After that you copy this service-file into %JBOSS%\server\default\deploy. Be sure that you have the jdbc driver for interbase and copy it into %JBOSS%\server\default\lib. Then start JBoss and see in the log file.

          Hope it helps.

          • 2. Re: JBoss 3.0 & Interbase
            tsangcn

            Are you using Interbase or Firebird ?
            If you are using Firebird, most people recommended using a new pure java JCA-JDBC driver for JBoss. You can download the driver at

            http://prdownloads.sourceforge.net/firebird/FirebirdSQL-1.0_beta_1.zip

            After unzip the file, copy the file filebirdsql.rar to $JBOSS_HOME/server/default/deploy

            JBoss 3.0 already have the sample configure files in $JBOSS_HOME/docs/examples/jca. Just copy the file $JBOSS_HOME/docs/examples/jca/firebird-service.xml to $JBOSS_HOME/server/default/deploy.

            Then edit the file $JOBSS_HOME/server/default/deploy/firebird-service.xml

            change according to the following (assume your server name is myserver and using port 3050)

            <!--config-property>
            <config-property-name>Server</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>myserver</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>Port</config-property-name>
            <config-property-type>java.lang.Integer</config-property-type>
            <config-property-value>3050</config-property-value>
            </config-property-->
            <config-property>
            <config-property-name>Database</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>myserver/3050:/home/databases/sample.gdb</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>UserName</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>sysdba</config-property-value>
            </config-property>
            <config-property>
            <config-property-name>Password</config-property-name>
            <config-property-type>java.lang.String</config-property-type>
            <config-property-value>password</config-property-value>
            </config-property>


            jdbc/SampleDS

            If your user and password is not sysdba and masterkey, you need to change to change them in the file $JBOSS_HOME/server/default/conf/login-config.xml

            =========================

            If you are using Interbase and/or Firebird, you can try the old interclient.

            Copy the interclient.jar to $JBOSS_HOME/server/default/lib

            copy a template file in $JBOSS_HOME/docs/examples/jca, say db2-service.xml, to $JBOSS_HOME/server/default/deploy and named it interbase-service.xml

            make changes to the file as follows:

            jdbc/SampleDS


            <config-property name="ConnectionURL" type="java.lang.String">jdbc:interbase://myserver//home/databases/sample.gdb</config-property>
            <config-property name="DriverClass" type="java.lang.String">interbase.interclient.Driver</config-property>
            <config-property name="UserName" type="java.lang.String">sysdba</config-property>
            <config-property name="Password" type="java.lang.String">masterkey</config-property>

            Then, change all occurences of DB2DS to any name you like, e.g. SampleDS.

            Remember the line

            DB2DbRealm

            should be commented out.

            ==========================================

            But I still have problem of doing UTF8 encoding. Can anyone help?

            • 3. Re: JBoss 3.0 & Interbase
              rkrcmar

              Thank You, I create new *-service.xml file for Interbase from db2-service.xml a it work very good. It is perfect. Thank very much. Radim

              • 4. Re: JBoss 3.0 & Interbase
                tdang

                please share your working service file with other people

                Regards.