4 Replies Latest reply on Feb 13, 2002 3:54 AM by Yudi

    database question

    mannu Newbie

      sorry for this other stupid question:
      What are the steps to add a new specific database in jboss?
      Should I create a Mbean in jboss.jcml?
      And after, should I create a type-mapping in standardjaws?
      Is it the right way?

      Be sure that I would be very happy to have many detailed answers...

        • 1. Re: database question
          Gudu Newbie

          I'm a jBoss newbie, but I have recently setup a MySQL datasource in jBoss 2.4.4. This is what I did:

          1. Put the MySQL JDBC driver in $(JAVA_HOME)/jre/lib/ext.
          2. Added the MySQL JDBC driver class to JdbcProvider mbean in jboss.jcml.
          3. Added a XADataSourceLoader mbean to jboss.jcml.
          4. Created a jboss.xml file and put it in the META-INF directory of my EJB jar file.
          5. Added a <resource-ref> to my ejb-jar.xml file.

          The relavant entries in jboss.jcml look like this:



          My jboss.xml looks like this:



          <resource-manager res-class="org.jboss.jdbc.XADataSourceLoader">

          And my ejb-jar.xml looks like this:








          I hope this helps.


          • 2. Re: database question
            mannu Newbie

            thanks a lot Mike!

            • 3. Re: database question
              mannu Newbie

              My ejb works, thank you Mike. I have managed to connect my access db to my ejb entity, itself linked to a session bean. When i remove or create a ejb entity it makes the same thing in my db without sql ligne: it seems magic!
              next step : db2 wrapper...

              • 4. Re: database question
                Yudi Newbie

                Hi All

                I'm also a jBoss (and java) newbie. I want to create a connection using a MS SQL 2000 JDBC Driver to MS SQL 2000. I have done the steps above but still get the following error msg:

                "javax.naming.NameMotFoundExecption : lasvr not bound"

                lasvr is the connection jndi name I used (I hope)