The new APEX Listener that will be powering the Oracle Cloud is out for an Early Access. There have been huge changes so be sure to check the documentation. The first change is that there's a more robust command line now.
Give it a try with this:
java –jar apex.war help
This new version supports multiple databases. Be sure to check out "Configuring Multiple Databases" there's lots of flexibility on how to route which requests to which database. Here's a jump start to getting it up and going.
To setup the database configuration information:
java -jar apex.war setup --database sales_db
Then the how to route what to where has to be done. There's 2 choices for this entire base URL or just the base path.
1) Base Path : This will route anything /apex/sales/* to the sales_db
java -jar apex.war map-url --type base-path --workspace-id sales_rest /sales sales_db
2) Base URL : This will ONLY route exact matches of the enture url to the sales_db. This include http vs. https. This example would give a 404 for any https request.
java -jar apex.war map-url --type base-url --workspace-id sales_rest http://example.com/apex/sales sales_db
Here's a screenshot of the upcoming configuration screens in sqldev to give an idea of some of the changes in the listener. Everything is still driven off xml config files so everything in this screenshot is there today to try out.