5 Replies Latest reply on Oct 15, 2001 2:02 PM by Andrew

    Recommended Open Source Database

    cleveridea Newbie

      Hi. I am an experienced Java developer although am new to J2EE. I have heard some good things about JBoss and wanted to give it a try.

      Within the HTML online JBoss documentation (which is pretty impressive for an open source project BTW) there is a section regarding the issues of using various Database systems with JBoss connection pooling and JAWS.

      The databases that I have most experience with are Oracle and Interbase. I am particularly interested in an all open source solution, so would prefer Interbase as my JBoss database. However, I would learn PostGres if that database is better supported.

      Having searched through groups.google.com for messages, and also looking at the comments about JDBC drivers below, I am concerned about reliable database operation with JBoss and JAWS. Interbase, Postgres and Oracle all have some worrying comments about stability. I have included some comments at the end of this posting.

      So my question is - can anyone suggest the open source database that is best supported with JBoss? That people are using right now, contributing feedback and bug fixes, able to provide guidance and assistance. Once I start learning JBoss I would like to give back any assistance I can and answer questions for others but would like to know which is the best route to start. Postgres? Interbase? MySQL?

      Any feedback greatly appreciated.

      Mark



      ---


      PostgreSQL 7.x

      Extreme Java "long" values will cause SQLExceptions and may corrupt the driver so that further actions fail.

      Interbase 6.x

      For CMP entity beans, serialized Java Objects are limited to 2000 bytes by default in automatically generated tables. You may increase this limit by changing the mapping or creating the table manually.
      The interclient JDBC driver seems to have trouble checking whether a table exists, so until that is resolved you can't have JAWS create the table anyway.

      Oracle 8i with native JDBC 2 Optional Package XADataSource

      Extreme Float or Double values will cause SQLExceptions The Oracle XADataSource requires the Oracle Xid implementation. Other vendor's XADataSource implementation may or may not be able to interoperate.

        • 1. Re: Recommended Open Source Database
          David Jencks Master

          Well, I'm partial to firebird (independent interbase), although I am not using it in a production setting. Firebird has a long history as a commercial db product and is once again under active development by people including one of the original developers. It's sql support is considerably greater than either postgres or mysql: of these you are more likely to feel the pinch w/mysql.

          The comment about 2000 byte limit is kind of minor, you just change some xml files.

          The interclient driver is another story. The particular problem with DatabaseMetaData I solved back in Feb in the firebird sourceforge cvs, but haven't gotten any cooperation from windows developer to compile it so we could release a binary version. It's easy to compile from source using the ant script. Allegedly Borland has released an interclient version with a DatabaseMetaData fix also, but I haven't located or tried it.

          However, the architecture and intrinsic capabilities of the interclient driver are so limited I wrote much of a pure java jca-jdbc driver that in particular exposes a real xa interface for 2pc. This driver is designed to work with the jboss jca framework with minimal overhead. The current state of the driver is that what is implemented works, as far as I know, and enough is implemented to make it usable with jboss for (at least) simple datatypes. If you'd consider trying it out, making suggestions, or contributing to its development, I would certainly appreciate it. It's in cvs at firebird.sourceforge.net under client-java.

          Thanks
          david jencks

          • 2. Re: Recommended Open Source Database
            cleveridea Newbie

            Hi David

            Thanks for the response. I wasnt aware of the Firebird project before you mentioned it.

            This probably sounds like a stupid question but what is an "xa interface for 2pc"? (new to JBoss and J2EE)




            • 3. Re: Recommended Open Source Database
              David Jencks Master

              If you haven't seen it, its not stupid.

              2pc = two phase commit is the protocol for reliable transactions across more than one resource manager (rm)(e.g. database). Usually you want to explicitly start a transaction and tell each rm you are going to use it: the fun comes when you commit. You (or jboss) tells someone (in java a TransactionManager) to commit: it tells each rm first to prepare, which means see if there are any problems with committing, and save everything in a "limbo" state, and report back. If every rm says "ok", the tm then tells all the rms to commit, which basically changes the state from "limbo" to "committed" so everyong else can see it. I believe firebird was the first commercial db to implement 2pc (I think it was not yet even called Interbase)

              XA is the x/open standard for how to do 2pc and distributed transactions (basically when there are several transaction managers on several machines all involved in the same transaction): the Java Transaction Architecture (JTA) is kind of a java translation of the xa spec.

              I have yet to hear of a reliable easy to set up xa driver for any db used with jboss: since firebird has the underlying features I thought it would be a good idea to write a driver that exposed them. (There is supposed to be a xa driver for Oracle, but it apparently is not spec compliant and seems to be extremely hard to set up -- there are many reports of problems but I haven't seen any reports of success recently)

              • 4. Re: Recommended Open Source Database
                cleveridea Newbie

                Thanks for the information. Reading about J2EE I did wonder how the transaction support was implemented to allow arbitrary numbers of bean invocations to be commited or rolled back as one atomic operation. Particularly in regard to supporting potentially different underlying resources (like various database DBMS - Oracle, Interbase etc) corresponding to different entity beans for example.

                >>The interclient driver is another story. The
                >>particular problem with DatabaseMetaData I solved
                >>back in Feb in the firebird sourceforge cvs, but
                >>haven't gotten any cooperation from windows
                >>developer to compile it so we could release a binary
                >>version.

                I could compile the binaries (I'm a Windows programmer weaning myself away from MS products).

                >>Regarding your jca-jdbc client program, I would be
                >>interested in If you'd consider trying it out,
                >>making suggestions, or contributing to its
                >>development, I would certainly appreciate it. It's
                >>in cvs at firebird.sourceforge.net under client-java.

                I certainly would be interested. You could email me at contactmark@hotmail.com to discuss things further if you would like.

                Regards

                Mark

                • 5. Re: Recommended Open Source Database
                  Andrew Newbie

                  Hi having problems with the jdbc 2 driver you mentioned can't seem to a get a buildable verson from the fire bird archives. I think it is mainly my lack of expertise with CVS and also the fact that you removed the test from the archives and it broke the build cripts. I am very interested in trying to use your driver with JBosss 2.4.1.

                  Is their any way you could send me a buildable version with a few pointers on how to intergrate it with jboss? My email is Andrewg(@)siemens.co.za If you can it would be very much appreciated. (remove the () from the email address)