6 Replies Latest reply on Feb 18, 2002 10:09 AM by davidjencks

    JBoss 2.4.4 and Seropto DataSource from inet software

    amccullo

      Has anyone used the com.inet.ora.XDataSource class as a DataSource in JBoss version 2.4.x? I am unsure what 'properties' can be set. Since the setServiceName, setServerName, setPortNumber methods are not part of the XADataSource interface how do I specify the servicename, servername, portnumber in the jboss.jcml file? I have tried 'Port=zzzz;ServerName=yyy.com;ServiceName=XXX' and that didn't work. I also looked at the example for the inet mssql driver and tried 'host=yyy.com;database=XXX' and that was not successful either. Should I just use the default XADataSource implementation that is provided with JBoss?

      Any help and example jboss.jcml config info would be appreciated.

        • 1. Re: JBoss 2.4.4 and Seropto DataSource from inet software
          amccullo

          Sorry for replying to my own post, I got the following answer from the INET folks.

          you can set the following properties:

          key name.......method
          user...............setUser()
          password......setPassword()
          host...............setServerName()
          port...............setPort()
          sid.................setServiceName()

          so the following _should_ work
          user=user;password=password;host=host;port=port;sid=sid
          Does this sound reasonable?

          • 2. Re: JBoss 2.4.4 and Seropto DataSource from inet software
            davidjencks

            Looks reasonable to me. Does it work?

            If you have some time to play with jboss 3 I'm hoping someone will contribute an xa driver config -- ask if you want a starting point.

            • 3. Re: JBoss 2.4.4 and Seropto DataSource from inet software
              amccullo

              Thank you for your reply.

              Actually, no it does not work. From looking at the source in JBoss (and adding debug statements) it is failing on the following line. (~ Line 410 in org.jboss.jdbc.XADataSourceLoader.jara from JBoss 2.4.4 release)

              // Test database
              try {
              log.info("Testing "+getSource().getPoolName());
              ---> getSource().getConnection().close();
              log.info("Tested "+getSource().getPoolName());
              }

              The behavior is a complete hang after the Testing... line but before the Tested... line, I left it for > 10 min with no timeout. At that point I just went with he standard XADatasource provided by JBoss (because I am under strict time constraints) which seems to work well so far.
              If you would like to give me some pointers on the xa driver config I would be happy to give it a try when I have time, I can't guarantee anything because I am currently working and trying to finish up grad school so time is in short supply. I will re-run the above example now that I have the netbeans debugger working, maybe I can get some more info on the failure.

              • 4. Re: JBoss 2.4.4 and Seropto DataSource from inet software
                davidjencks

                basically this hang means you haven't set up your driver correctly and aren't getting a connection. Very often it is a url problem. If you are in the mood for debugging, I'd put some logging statements in to make sure the properties are really getting set on the XADataSource .

                If you use the jboss "XADataSourceImpl" remember that it is NOT a way of getting xa semantics out of a non xa driver and you will NOT be able to do real 2pc. (jboss won't complain, there is just no prepare step with this wrapper).

                • 5. Re: JBoss 2.4.4 and Seropto DataSource from inet software
                  amccullo

                  I am extremely humbled on this one. It turns out that the setProperties was being called correctly, however, I had mistyped the port number (1251 instead of 1521). This caused an SQLException (Connection refused) to be thrown during the getSource().getConnection().close()
                  call. Unfortunately this caused a complete hang with no log message from JBoss. Once I found my typo, beat my head against the keyboard, and fixed it, the XDataSource from inet started up fine.

                  Is there a simple way to verify that I am indeed getting a full Two-Phased Commit?

                  • 6. Re: JBoss 2.4.4 and Seropto DataSource from inet software
                    davidjencks

                    That hang is no fun. Due to the pooling, I haven't found an easy way to get rid of it however. Maybe removing the connection check is the best plan, since it usually results in this uninformative hang.

                    I don't know of an easy way to check you are getting 2pc... looking at the db server logs might help.

                    I should warn you also that the jboss standard tx manager doesn't do logging of tx participants so has no way to recover from crashes. However, it is very fast;-) If you need recovery you also need to use the Tyrex tm instead of the jboss tm.