4 Replies Latest reply on Feb 11, 2004 3:05 PM by rzfrantz

    Oracle datasource configuration

    b_boyle18 Newbie

      Hi!
      I am trying to set up my first CMP EJB and I have been at it for the last week and I am still having trouble setting up my datasource. I am using Oracle 8i Personal edition and my schema is called BBOYLE@BOYLE. Basically what I would like to find out is what xml files I need to create and modify so that I can create a connection to my database. I know about jbosscmp-jdbc.xml but I dont know how to congifure it properly. I ave also heard about oracle-DS.xml but I'm not sure what to do with that, and I also don't know if I have to make reference to my datasource in my ejb-jar.xml.
      I have been using Lomboz in Eclipse to generate a lot of my xml files but it also creates a lot of extra files that I do not need.
      As you can probably guess, I'm new to JBoss and EJBs so it would be great if someone could tell me exactly the files that I need to setup my orale datasource.
      Thanks in advance,
      Brian

        • 1. Re: Oracle datasource configuration
          Jon Barnett Master

          JBOSS_HOME/docs/examples/jca/oracle-ds.xml is copied into your run-time deployment directory. Usually this is the default instance unless you specifically override it. So it should be copied into JBOSS_HOME/server/default/deploy. You can rename it anything you like as long as it ends with -ds.xml, as this signals to the JBoss server that the configuration file is for a datasource.

          You must modify the file to add the JDBC URL for your database. I'm not familiar with the personal edition - although someone mentioned that it uses a JDBC-ODBC bridge. Check with your documentation on the JDBC driver used and the JDBC URL required in order to connect to your database. Replace the defaults in the file with your database username and password. Rename the jndi-name to your requirements - say OracleDS.

          The oracle-ds.xml is configured to use the standard Oracle JDBC driver (usually packaged in classes12.zip or similar). You put the JDBC jar in JBOSS_HOME/server/default/lib.

          Modify JBOSS_HOME/server/default/conf/standardjbosscmp-jdbc.xml for the datasource entry - it should be java:/OracleDS if you used the above suggestion. The datasource-mapping should be changed to Oracle8. If you search the file, further on you will see that there is a mapping entry for Oracle8.

          Hope that helps.

          • 2. Re: Oracle datasource configuration
            b_boyle18 Newbie

            Yeah this helps, thanks

            • 3. Re: Oracle datasource configuration
              hiersoy Newbie

               

              "jonlee" wrote:
              JBOSS_HOME/docs/examples/jca/oracle-ds.xml is copied into your run-time deployment directory. Usually this is the default instance unless you specifically override it. So it should be copied into JBOSS_HOME/server/default/deploy. You can rename it anything you like as long as it ends with -ds.xml, as this signals to the JBoss server that the configuration file is for a datasource.


              Hi,

              Thank you very much. I have rarely seen this fact mentioned : "You can rename it anything you like as long as it ends with -ds.xml".

              • 4. Re: Oracle datasource configuration
                rzfrantz Newbie

                The DataSource (OracleDS) in Jboss has a connection pool?