7 Replies Latest reply on Feb 24, 2003 11:07 AM by doc_brown

    Informix Datasource config help

    doc_brown

      I'm trying to config JBoss to work with informix. I have the following in <JBOSS_ROOT>/default/deploy/informix-service.xml:

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

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


      <!-- start SITE db config -->

      <depends optional-attribute-name="ManagedConnectionFactoryName">

      site


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:informix-sqli://192.168.1.20:8900/site:INFORMIXSERVER=sqlsport0_tli</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.informix.jdbc.IfxDriver</config-property>
      <config-property name="UserName" type="java.lang.String">UserName</config-property>
      <config-property name="Password" type="java.lang.String">PassWord</config-property>


      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=RARDeployer


      <depends optional-attribute-name="ManagedConnectionPool">

      0
      50
      5000
      15
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:name=JaasSecurityManager
      java:/TransactionManager
      jboss.jca:service=RARDeployer

      <!-- end SITE db config -->


      Upon startup of JBOSS the following is tossed:
      17:44:37,839 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=LocalTxCM,name=site
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxDS,name=site
      jboss.jca:service=LocalTxPool,name=site
      jboss.jca:service=CachedConnectionManager
      jboss.security:name=JaasSecurityManager
      jboss.jca:service=RARDeployer

      Depends On Me: , ObjectName: jboss.jca:service=LocalTxDS,name=site
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=RARDeployer

      Depends On Me: jboss.jca:service=LocalTxCM,name=site
      ]

      Help please?

      Also, how would I get a second informix Datasource setup ?

        • 1. Re: Informix Datasource config help
          sbocquet

          Hi,

          Personnaly, I use the informix-ds.xml file to link my datasource, and it works perfectly.
          I have problems to configure my link with the informix-xa-ds.xml file (XA datasource).

          Here is my informix-ds.xml config file to put in the same place as yours...
          <?xml version="1.0" encoding="UTF-8"?>

          <local-tx-datasource>
          <jndi-name>InformixDS</jndi-name>
          <connection-url>jdbc:informix-sqli://siege03d:1399/watoo:INFORMIXSERVER=onlinetli_devt</connection-url>
          <driver-class>com.informix.jdbc.IfxDriver</driver-class>
          <user-name>user</user-name>
          password
          </local-tx-datasource>


          I'm also interrested with your second question...

          Cheers,

          Stéphane

          • 2. Re: Informix Datasource config help
            doc_brown

            <Cue Sound of a car screaching to a halt>

            Is that all I need to get a DS up in JBoss 3?

            Why the hell are the "sample" configs soooo cryptic then?

            • 3. Re: Informix Datasource config help
              lafr

              To get mupltiple informix datasources simply define mupltiple <local-tx-datasource> in informix-ds.xml with unique <jndi-name>.

              • 4. Re: Informix Datasource config help
                doc_brown

                Do need both the informix-ds.xml and informix-service.xml?

                (Also, I'm running 3.0.6 if that matters)

                • 5. Re: Informix Datasource config help
                  davidjencks

                  The *-ds.xml files only work with jboss 3.2 and 4. I'd upgrade to 3.2RC2 right away if you are still at the stage of trying to get a datasource working, and keep upgrading until 3.2 final comes out.

                  There are some unneeded warnings in 3.2RC2 log about changing some settings abou the tx manager. ignore them or build 3.2 from cvs.

                  The *-ds.xml format exists because I finally got fed up with the complexity of the plain *-service.xml files for datasource configurations.

                  To deploy more than one datasource using *-ds.xml files, just give them different jndi names. You can put as many configs as you want in one *-ds.xml file.

                  • 6. Re: Informix Datasource config help
                    doc_brown


                    davidjencks, thanks for your advice. However, this is for a production application with very, very high visibility to the end users.

                    It is _not_ an option to "keep upgrading until 3.2 final comes out" (unless it 3.2 is comming out with in 1 or 2 weeks).

                    Anyways, I got 1 datasource to work, but now I'm working on getting 2 datasources up. I've replicated the first datasource and changed the relevant data and placed this code in the same informix-service.xml files.

                    How do I get 2 datasources in 3.0.6?


                    Jim/Doc Brown

                    PS: Now that I'm starting to under stand the *-service.xml files, they aren't that complex. I personally think the problem is that they documentation on them is lacking and this is causing the headaches.

                    • 7. Re: Informix Datasource config help
                      doc_brown

                      Well, I figured out how to get 2 datasources in 3.0.6

                      Here is how (for those of you who might need this in the future):

                      Each datasource needs a file in <JBOSS_HOME>/server/default/deploy called -service.xml.
                      In this case I called them informix-DS1-service.xml and informix-DS2-service.xml.

                      In each of these files the following JNDI database name and connection url must be set right. Also the jca name should be unique for each connection. Below is a sample of one of the configs. In this sample the jca name is InformixDS1. This could be any valid name string, but it's probabaly best pratice to have this refrence the JNDI name in some way. In the second (and third, etc) datasource configs these names need to be unique for each file.

                      Informix-DS1-service.xml:
                      <?xml version="1.0" encoding="UTF-8"?>
                      <!DOCTYPE server>


                      <depends optional-attribute-name="ManagedConnectionFactoryName">

                      DataSourceOne


                      <config-property name="ConnectionURL" type="java.lang.String">jdbc:informix-sqli://192.168.1.20:8900/ds1:INFORMIXSERVER=sqlds_tli</config-property>
                      <config-property name="DriverClass" type="java.lang.String">com.informix.jdbc.IfxDriver</config-property>
                      <config-property name="UserName" type="java.lang.String">username</config-property>
                      <config-property name="Password" type="java.lang.String">password</config-property>


                      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper


                      <depends optional-attribute-name="ManagedConnectionPool">

                      0
                      50
                      5000
                      15
                      ByContainer


                      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
                      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
                      java:/TransactionManager
                      jboss.jca:service=RARDeployer




                      Jim (aka Doc Brown)