1 Reply Latest reply on Feb 5, 2003 8:54 AM by mschoning

    Configuration file to J2EE

    rafonso

      Hello:
      I am using J2EE with JBoss. To configure database, it is necessary use an XML file (example: oracle-services.xml) that follows certain conventions dictated for the application server (in this case the JBoss). However I do not desire that my configurations are dependent of a server. Or either, I want that my EJB's, instead of reading an archive determined for the Server (it can be JBoss, BEA, Oracle, etc), reads a file determined for me. That is possible? How?

      Thanks,

      =================================
      Rafael U. C. Afonso
      Java Programmer Certified
      =================================

        • 1. Re: Configuration file to J2EE
          mschoning

          Hi Rafael.

          There is a J2EE "way" of being independent from the container. That is to use JNDI. Your application should really never look into the oracle-services.xml or any other jboss configuration file. If you need a datasource, simply look it up using JNDI. This will work even if you some day move your application to another container (assuming that also is a J2EE contianer). How you configure the datasource is up to each container though, here on JBoss you might for example configure an oracle datasource using oracle-services.xml But you application is not in any way tied to this xml file.

          Best regards, Michael