4 Replies Latest reply on Sep 5, 2015 7:56 AM by rwendel

    ORDS 3.0 and mod_plsql migration

    dmdamiyo

      Hello, Probably this is a naive question, but anyway:

      I've configured and deployed ORDS on weblogic server. I've got a legacy architecture that connects to the same database but using OHS and mod_plsql.

      In the legacy setup I have DADs configured with URLs and stuff. My question is how can I access these legacy applications that are accessible through mod_plsql via ORDS so I can switch off OHS?

       

      How can I construct a proper URL? Because every ords app follows this pattern of f?p=1 etc. Do I have to modify ords configuration since it is the same database?

      I don't really get the relation between these two connectors as I always worked with APEX listener (called now ORDS).

      Any hints will be appreciated.

        • 1. Re: ORDS 3.0 and mod_plsql migration
          Kiran Pawar

          Hi,

          4d97797d-f5af-48dc-b59a-9c299e286db1 wrote:

               Please change your user handle to recognizable user name. Refer : Video tutorial how to change nickname available

          Hello, Probably this is a naive question, but anyway:

          I've configured and deployed ORDS on weblogic server. I've got a legacy architecture that connects to the same database but using OHS and mod_plsql.

          In the legacy setup I have DADs configured with URLs and stuff. My question is how can I access these legacy applications that are accessible through mod_plsql via ORDS so I can switch off OHS?

               What do you mean by "DADs configured with URLs and stuff"? Do you mean some custom functionality like Apache Rewrite Rules?

          How can I construct a proper URL? Because every ords app follows this pattern of f?p=1 etc. Do I have to modify ords configuration since it is the same database?

          I don't really get the relation between these two connectors as I always worked with APEX listener (called now ORDS).

          Any hints will be appreciated.

               By constructing URL do you mean OHS has http://host:port/pls/apex/f?p whereas ORDS has http://host:port/ords/f?p (the rest part of URL is standard APEX URL syntax).

               If that is the case you can rename ords.war to pls.war before deploying to Oracle WLS and use URL mapping feature in ORDS to map /apex URLs to proper database containing your APEX instance.

           

               As to solve both the above problems you could use ORDS deployed Oracle WebLogic Server as your Middle Tier for APEX and Apache HTTP Server/OHS as reverse proxy (where you can write your Rewrite Rules).

               Refer : Dimitri Gielis Blog (Oracle Application Express - APEX): Preparing architecture for APEX 5.0 upgrade

           

               Also refer the following OHS to ORDS migration related thread : How do I migrate from OHS to ORDS?

           

          Regards,

          Kiran

          1 person found this helpful
          • 2. Re: ORDS 3.0 and mod_plsql migration
            dmdamiyo

            Hello Kiran,

            This is helpful. Thanks for the links.

             

            No I don't have anything special in dad.conf, just database, user and password. Everything is in the same database but diferrent user so do I have to configure any mappings?

            Normally in ords config I connect to the database as APEX_PUBLIC_USER.

             

            By constructing URL I mean that in dad.conf I have specified location like:

            <Location /pls/test>

            So I can access this application under servername.domain.com/pls/test/test.home

             

            Using ORDS I have to follow f?p=alias

            So now I can access various apps like

            servername.domain.com/ords/f?p=1

            servername.domain.com/ords/f?p=2

             

            I don't know how to go from this:

            servername.domain.com/pls/test/test.home

            to this:

            servername.domain.com/ords/f?p=????


            servername.domain.com/ords/test/test.home <- 404 not found


            So maybe my real question was: how do I know an application id?


            edit: I changed my username but it is still the same


             

             


            • 3. Re: ORDS 3.0 and mod_plsql migration
              Kiran Pawar

              Hi,

              4d97797d-f5af-48dc-b59a-9c299e286db1 wrote:

               

              No I don't have anything special in dad.conf, just database, user and password. Everything is in the same database but diferrent user so do I have to configure any mappings?

              Normally in ords config I connect to the database as APEX_PUBLIC_USER.

              By constructing URL I mean that in dad.conf I have specified location like:

              <Location /pls/test>

              So I can access this application under servername.domain.com/pls/test/test.home

              Using ORDS I have to follow f?p=alias

              So now I can access various apps like

              servername.domain.com/ords/f?p=1

              servername.domain.com/ords/f?p=2

              I don't know how to go from this:

              servername.domain.com/pls/test/test.home

              to this:

              servername.domain.com/ords/f?p=????

              servername.domain.com/ords/test/test.home <- 404 not found

              So maybe my real question was: how do I know an application id?

                   This problem can be solved by using Apache HTTP Server as Reverse Proxy in front of ORDS + Oracle WLS.

                   Refer the following similar thread : 2 applications on one website

                   I tried the same thing(in my APEX configuration) with ORDS + Apache Tomcat with Apache HTTP Server as Reverse Proxy with following as my "httpd-vhosts.conf" (in Apache HTTP Server):

              <VirtualHost *:80>
                  ServerName abc.xyz.com
                  ServerAlias abc.xyz.com
                  ProxyPreserveHost On
                  RewriteEngine On
                  RewriteRule ^/$ /ords/f?p=100:LOGIN_DESKTOP [R=301,L]
                  RewriteRule ^/bugs$ /ords/f?p=101:LOGIN [R]
                  RewriteRule ^/projects$ /ords/f?p=102:LOGIN [R]
                  ProxyPass /ords http://localhost:8484/ords
                  ProxyPassReverse /ords http://localhost:8484/ords
                  ProxyPass /i http://localhost:8484/i
                  ProxyPassReverse /i http://localhost:8484/i
              </VirtualHost>
              

               

                   NOTE : You will need to enable the required modules before writing the above rules in Apache HTTP Server. "abc.xyz.com" is the server name also entered hosts.conf entry for it. You will need to play with the Apache Rewrite Rules to get a grip on it.

                   So, whey I type http://abc.xyz.com/bugs it redirects me to 101 "Bug Tracker" sample application of my workspace and same for projects.

               

              Regards,

              Kiran

              • 4. Re: ORDS 3.0 and mod_plsql migration
                rwendel

                I don't know how to go from this:

                servername.domain.com/pls/test/test.home

                to this:

                servername.domain.com/ords/f?p=????


                servername.domain.com/ords/test/test.home <- 404 not found


                For generic plsql gateway programs, you don't switch. In this new setup using ORDS, you have two options. One is using the single 'apex' connector. You do this by changing the login user from APEX_PUBLIC_USER to your normal DAD login and password. This is done either using the utility (java -jar ords.war install advanced) in which case when it prompts for PLSQL Gateway Setup you choose yes, and when it asks for username, you choose a different one than the default APEX_PUBLIC_USER.


                Back to the "url change"


                In this scheme, you would have "server.domain.com/ords/test.home" available if you setup just the default connector ONLY.


                If you chose to migrate multiple DADs, then you can set them up each as connector, then URL map them into each connector. This is in the url-mapping.xml file


                <pool-config xmlns="http://xmlns.oracle.com/apex/pool-config">

                  <pool base-path="/test" name="test" schema-name="DAD_USER" />

                  <pool base-path="/prod" name="prod" schema-name="DAD_USER" />

                </pool-config>


                Then you would have if your ords-config directory, $ORDS_CONFIG/ords/conf/

                apex.xml

                prod.xml

                test.xml


                Where prod.xml may look like:


                <?xml version="1.0" encoding="UTF-8" standalone="no"?>

                <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">

                <properties>

                <comment>Saved on Fri Sep 04 23:23:35 EDT 2015</comment>

                <entry key="db.hostname">proddatabase.domain.internal</entry>

                <entry key="db.password">@mypasswordhash</entry>

                <entry key="db.servicename">PROD.domain.internal</entry>

                <entry key="db.username">DAD_USER</entry>

                <entry key="sqldev.name">prod</entry>

                </properties>

                 

                Under this scenario, you could have difference instance connections.

                 

                server.domain.com/ords/test/test.home

                server.domain.com/ords/prod/prod.home