5 Replies Latest reply on Feb 10, 2012 7:58 PM by Udo

    Configure two or more databases with Oracle ApEx Listener

    866609
      Hi All,

      We have Oracle Database 11gR2 database, Oracle APEX Listener configured with Apache Tomcat. Now we are craeting one more database on the same server. Can you please advice/guide me how to configure another darabase with Oracle APEX listener?

      Many Thanks.

      Regards,
      Faheem Raza
        • 1. Re: Configure two or more databases with Oracle ApEx Listener
          Udo
          Hi,
          Can you please advice/guide me how to configure another darabase with Oracle APEX listener?
          You have to deploy the APEX Listener a second time using a different context. You can configure that second APEX Listener to connect to your second database. We actually use database names as contexts, e.g.

          http://jee_host:8080/db_instance_1 is the APEX Listener pointing to the database with SID db_instance_1
          http://jee_host:8080/db_instance_2 is the APEX Listener pointing to the database with SID db_instance_2
          etc.

          -Udo
          • 2. Re: Configure two or more databases with Oracle ApEx Listener
            915154
            Make sure that you modify the web.xml in the second deployment to make sure your config.dir points to another configuration directory so you don't step on your previous configuration. You can do this easily by using a variable in teh command line. See previous post.
            • 3. Re: Configure two or more databases with Oracle ApEx Listener
              Udo
              Hi Jack,

              you don't need to make it that complicated. As noted in the "Installation and Developer Guide" for APEX Listener, the application uses the first config file it finds by using the following search sequence:
              1. ${config.dir}/<Mount-Point>/apex-config.xml (from web.xml, if specified)
              2. ${config.dir}/apex-config.xml (from web.xml, if specified)
              3. ${user.home}/<Mount-Point>/apex-config.xml.
              4. ${java.io.tmpdir}/<Mount-Point>/apex-config.xml (default for new installs)
              5. $HOME/apex-config.xml
              6. ${java.io.tmpdir}/apex/apex-config.xml (default for new installs)
              If you configure ${config.dir} to point at some place like +/opt/oracle/apex_listener+ and create a separate directory for each deployment, e.g. +/opt/oracle/apex_listener/db_instance_1+ and +/opt/oracle/apex_listener/db_instance_2+ for the two instances above. If you place your apex-config.xml for each instance accordingly, you can stick with one modified .war-file you just use for different contexts ("mount-points").
              You don't even need to touch the web.xml if you implement the third option, but usually you wouldn't want the APEX Listener stuff in the home of the user that runs your JEE container.

              -Udo
              • 4. Re: Configure two or more databases with Oracle ApEx Listener
                AnandKumar
                Dear All,

                I have tried as mentioned above and created 2 contexts, apexorcl and apexorcl1. But every time i configure the listener it is pointing to the latest configured instance. Please let me know where i am wrong.

                I have also created 2 separate apexlistener folders, where in apex.war and edited apex-config.xml are placed. I am providing this as archive location and then proceeded with seperate context specification.


                http://192.27.0.2:8888/apexorcl/f?p=4550
                http://192.27.0.2:8888/apexorcl1/f?p=4550

                Regards,
                Anand.
                • 5. Re: Configure two or more databases with Oracle ApEx Listener
                  Udo
                  Hello Anand,

                  I'm not sure whether you've actually performed the configuration steps as suggested. As I'm not sure troubleshooting your problem helps the author of the original post, please open a new thread and describe exactly what you did.
                  When you do so, please provide information on the platform (OS and JEE Container) you're using and, if possible, a step-by-step description of your configuration.
                  edited apex-config.xml are placed
                  Could you check in your application log whether the APEX Listener actually grabs the file you expect? Most likely that's not the case, so you've probably some small error in your web.xml. But as I don't know what you did, it's just a guess...

                  -Udo