4 Replies Latest reply on Jan 14, 2014 9:20 PM by David Pulliam

    APEX Listener and Multiple APEX Instances

    David Pulliam

      I have got APEX 4.x.x and Apex Listener 2.0.5 and I am really interested in configuring multiple instances of APEX to run through the same listener.  I found information on how you create your multiple connections but I am really confused by the portions on how you have to setup your URL Maps.  In my case I am insterested in something along the lines of https://apex.example.com/prod/, https://apex.example.com/dev/, https://apex.example.com/pprd/ where each of them is APEX running on a different database.  I am amendable to actually having the prod one run straight on https://apex.example.com/ as long as I could setup some kind of a default homepage app instead of directly offering the login page for that instance.  Can anyone offer any guidance in this type of a setup?  I am ok if need be to have the urls be along the lines of https://apex.example.com/apex/, https://apex.example.com/apex/dev/, https://apex.example.com/apex/pprod/ if they must be.  Note my deployment is on Weblogic 12c and I am using SQL Developer to admin the listener.

        • 1. Re: APEX Listener and Multiple APEX Instances
          David Pulliam

          The first thing I did was fully configure the Listener so I can manage it via SQL Developer and this part is working.  I have added the DB Connections but the part that getting murky is setting up the routing in the listener so that it goes to the correct DB.  How does the terms used in SQL Developer translate over to the ones in the URL-Map information in the manual as it uses different names for each type of URL map.  I am thinking I will need to use a Request type of URL-Map.

          • 2. Re: APEX Listener and Multiple APEX Instances
            Mike Kutz

            Listeners are so light-weight, I have one for each (in virtual boxes)

            I prefer to keep listeners on separate servers as it is easier for me to verify that I am not about to run 'truncate table ...' on production.

            (my $0.02 worth)



            For dev, I have multiple DB connections.

            The primary one (http://host:port/apex) points to my true development 11g box.

            The secondary one (http://host:port/apex/a12) points to my "playground" 12c box.



            For the 12c, the URL Mappings are: (SQL Developer 3.2 and 4.0)

            Rule Type        = URL Path

            Routing Rule     = http://host:port/apex/a12

            Schema for REST. = (blank)



            After I got that to work, I haven't played with any other options/ideas.



            • 3. Re: APEX Listener and Multiple APEX Instances

              Hi David,


              I am in a similar situation to you:

              Multiple db connections with RESTful Services


              However I have got the Listener to talk to multiple databases.

              The following works for me across three different databases - I have three separate entries under the Database settings node under the SQL Developer Listener configuration GUI.


              dev - this is the connection that was set up by the Listener by default.

              URL mapping simply has a "Request Path" entry with routing Rule of /dev and schema name of /dev <RESTful service name - in my case the same name of the APEX workspace>

              (NB: This is only to facilitate REST - by default this will connect to the dev instance of APEX as this was the default credentials used to set up the Listener)

              Therefore the URL is http://servername/apex by default.


              uat - new entry created manually through SQL Developer

              setup Connections node to point to your database as you would for any standard type of database connections

              URL mapping simply has a "Request Path" entry with Routing Rule of /acc and RESTful Services schema of blank

              The URL is then http://servername/apex/uat


              prd - same as uat but with request path entry and Routing Rule of /prd

              The URL is then http://servername/apex/prd


              I like the request path setting rather than the full URL path as it is more flexible.




              1 person found this helpful
              • 4. Re: APEX Listener and Multiple APEX Instances
                David Pulliam

                I like the idea of running separate listeners as well as long as you are looking at one listener, one instance of APEX, one webtier server, and one db server.  In our case, the reason I am looking at multi-tenant listeners is because we plan to run our APEX on a Weblogic cluster of four VM Servers with a hardware load balancer in front of it.  By leveraging the same front ends we get to minimize the footprint on our physical hardware (ie. need fewer VMs for the entire infrastructure to support APEX) and we gain the resiliency of the clustered front end for our development and pre-production instances as well (seen as a bonus but not required).  Eventually our hopes are to implement Oracle RAC and this all seems to work together nicely to that end.