5 Replies Latest reply on Apr 24, 2003 1:14 PM by David Hoots

    Basic DB Configuration

    David Hoots Newbie

      I'm just trying to set up the most basic database configuration so that I can use the JBoss database pooling. No BMP or CMP. I've read the free and the pay documents, but nowhere can I just find a simple example of how to do this. Something like:

      1) Create the datasource file using the *-ds.xml files in the examples directory
      2) Place the *-ds.xml file in the ..... directory
      3) Edit the ... file
      4) Etc., etc.

      I'm using MySQL so I started with the mysql-ds.xml file in the examples directory, but, where do I put this? What else do I need to do? Is there a DTD available for the *-ds.xml files?

      This is my first time using 3.X, so I'm not familiar with the JCA framework. In 2.X there were some very simple examples of how to setup a datasource in the jboss.jcml file. Is there no such help for 3.X?

      Thanks,
      David

        • 1. Re: Basic DB Configuration
          David Jencks Master

          Lets assume you are using the "default" configuration

          1. Put your driver jar in .../default/lib (before starting jboss)

          2. Edit the appropriate settings in the *-ds.xml to fit your installation.

          3. As with any deployable, put the *-ds.xml in ...default/deploy. You may want to remove hsqldb-ds.xml, but be careful of the jms persistence manager which is using it by default.

          4. If you are using cmp, edit .../default/conf/standardjbosscmp-jdbc.xml to indicate the name of your datasource and the appropriate type mapping. (before starting jboss)

          Personally, I thought the numerous db-specific example config files were clearer than the single example in 2.4 jboss.jcml. In fact I think the number of questions may actually have declined.

          • 2. Re: Basic DB Configuration
            David Hoots Newbie

            You're right, they are much easier. My problem was that I couldn't get it to work, and I couldn't find anything that said that using the *-ds.xml file was all I needed to do, so I wasn't sure if I was missing something.

            Shouldn't there be way to associate these files (ds) with a specific application by puting them in the application's WAR file?

            • 3. Re: Basic DB Configuration
              David Hoots Newbie

              You're right, it's much easier. My problem is that I couldn't get it to work, and I couldn't find anything that said that setting up the ds file was all I needed to do, I wasn't sure if I was missing something.

              Thanks for the help!

              • 4. Re: Basic DB Configuration
                David Jencks Master

                You can put *-ds.xml files in .ears if you include a jboss-app.xml file next to application.xml with

                <jboss-app>

                my-ds.xml

                </jboss-app>

                They may also get deployed from inside ejb jars and .rar with no special instructions. .war's are harder since for the most part deployment is not handled by jboss.

                • 5. Re: Basic DB Configuration
                  David Hoots Newbie

                  Awesome, thanks again for the help!