7 Replies Latest reply on Jul 17, 2003 5:27 AM by kar2000

    Database Connection Oracle

    Markus Richter Newbie

      Database connection key topic of an Application Server. There are already quite a lot postings regarding this topic. However, none of them really explains how to set up a database connection step by step. I hope someone can tell me how to do it!
      The documentation (chapter 3) has an sample XML script for an Oracle database. According to the documentation I have to put this file in JBoss 3.0 into the jboss_home/deploy directory. If I start JBoss and look then into the server.log file, I am not able to find any entry that shows me that the database connection was successful. It seems the XML wasn't caught by JBoss!

      So, I hope somebody can tell (step by step) me and others!! what to do either for JBoss 3.0 or JBoss 2.4.3!

      Thanks so much!

        • 2. Re: Database Connection Oracle
          Rajesh Newbie


          thanxs for the link. but i couldn't read it as the link is not working. please, write me working link.


          • 3. Re: Database Connection Oracle
            Albena Newbie

            This is a working link Rajesh and the reading is very good there.
            Good luck!
            The Fairy

            • 4. Re: Database Connection Oracle
              Albena Newbie

              After reading David's posting at http://main.jboss.org/thread.jsp?forum=46&thread=3109
              I have a better understanding of what is going on, yet can not get my datasource working :(

              My configuration is as follows:
              jboss-3.0.0alpha on Win2000
              I want to use a MS SQL6.5 database as a datasource.

              I have modified the mssql-service.xml file and put it in
              the deploy dir. Next to that I have put the database
              driver's jar file in the lib/ext directory and pointed on
              it using the classpath element of mssql-service.xml file ( containing the ConnectionFactoryLoader mbean ).
              So far so good.
              From the server.log I can read that my ConnectionFactoryLoader,name=MSSQL65DS mbean is deployed
              and configured, but it hangs on dependences, so it is
              never started or bound to some JNDI name.

              This is the last thing I hear from my ConnectionFactoryLoader,name=MSSQL65DS mbean in the server.log:

              [2002-01-30 10:52:07,437,Configurator,DEBUG] found 2 mbean-ref elements
              [2002-01-30 10:52:07,437,Configurator,DEBUG] considering ResourceAdapterName with object name jboss.jca:service=RARDeployment,name=Minerva
              JDBC LocalTransaction ResourceAdapter
              [2002-01-30 10:52:07,437,Configurator,DEBUG] ResourceAdapterName set to jboss.jca:service=RARDeployment,name=Minerva
              JDBC LocalTransaction ResourceAdapter in JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=MSSQL65DS
              [2002-01-30 10:52:07,437,Configurator,DEBUG] considering ConnectionManagerFactoryLoaderName with object name jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory
              [2002-01-30 10:52:07,437,Configurator,DEBUG] ConnectionManagerFactoryLoaderName set to jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaSharedLocalCMFactory in JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=MSSQL65DS
              [2002-01-30 10:52:07,437,ServiceController,DEBUG] waiting to start JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=MSSQL65DS until dependencies are resolved

              What dependences?
              Am I missing something? The 2 reference beans are already
              wel set. I tryed to make a parallel with the DefaultDS
              The only difference between DefaultDS and MSSQL65DS is
              that DefaultDS has one more <mbean-ref> to the Hypersonic
              database as follows

              [2002-01-30 10:52:03,031,Configurator,DEBUG] Anonymous dependency on object name JBOSS-SYSTEM:service=Hypersonic

              and after the Hypersonic database mbean self is deployed


              the DefaultDS is started and bounded to java:/DefaultDS.

              Do I nead to create an additional mbean for my MSSQL6.5
              database and how? ehmm, till later,

              The Fairy

              • 5. Re: Database Connection Oracle
                David Jencks Master

                double check the spelling of the two referenced mbeans, and check in the jmx console that they are "started". Make sure there aren't extra spaces at the end of the mbean-ref (all on one line).

                • 6. Re: Database Connection Oracle
                  Albena Newbie

                  The problem was lying in the

                  <mbean-ref name="ConnectionManagerFactoryLoaderName">

                  line of the mssql-service.xml example file. It should be

                  <mbean-ref name="ConnectionManagerFactoryLoaderName">

                  That is why this reference mbean was not found and my datasource mbean was waiting in a dependance mode.
                  David, thanx for helping me trace the problem.

                  Maybe worth of mentioning is the mbean's value case sensitivity.

                  Sun's http JMX adaptor at http://localhost:8082 helped me
                  a lot as well. It gives a beautiful (http)overview of what is happening with your mbeans. When you are reffering to a JMX console, is that what you mean?

                  • 7. Re: Database Connection Oracle
                    kar2000 Newbie

                    Well, I have a doubt in this regard - is there any means of finding in the jboss 3.0.7 server side and not in the Oracle 8 database server side,

                    how many connections are there in the pool,

                    how many connections are in use and

                    how many connections are being returned at a given point of time?