Migrating mod_plsql application to Oracle REST Data Services

I read in MOS Doc ID 1945619.1 that, starting with 12.1.3 Oracle HTTP Server (OHS), the mod_plsql function is deprecated and will not be included in 12.2 Oracle HTTP Server.

In the future, Oracle recommends moving to Oracle REST Data Services (formerly known as Oracle APEX Listener) as an alternative to mod_plsql.

There are many mod_plsql applications in our store (i.e. applications written by usinjg HTP / HTF packages). Since I don't know anything about Oracle REST Data Services, I ask you if we can migrate old applications to this new product without changing the code.

Thanks.

Regards, Christian

+6
source share
3 answers

Doug McMahon (Oracle employee) has an excellent open source module for Apache. Apache PL / SQL Gateway Module (Mod_owa)

https://oss.oracle.com/projects/mod_owa/dist/documentation/modowa.htm

I use it in a production environment and I highly recommend it. It is really fast and great.

You need to compile, but it's worth it to use Apache 2.4 and mod_plsql.

Steps:

  • download httpd 2.4.? from apache.org + extract
  • If Centos 6 or less loads apr and apr-util
  • configure with enable-so, make and make install

    ./configure --enable-so --with-apr = / usr / local / apr --with-apr-util = / usr / local / apr

  • Download mod_owa + unzip

  • create an empty directory. Copy all files with "apache24" to the new folder. Copy all files from "src" to the new folder

  • enter a new folder and edit modowa.mk <- it is important to add $ ORACLE_HOME, edit APACHE_TOP

  • Copy mod_owa.so to apache modules

  • Add modowa.conf to apache conf / dir.

Example modowa.conf:

loadModule owa_module modules/mod_owa.so <Location /pls> Options None SetHandler owa_handler OwaUserid user/pass OwaNLS AMERICAN_AMERICA.AL32UTF8 OwaPool 100 OwaStart "package.procedure" OwaDocProc "wwv_flow_file_mgr.process_download" OwaDocTable photos_upload BLOB_CONTENT OwaUploadMax 50M OwaCharset "utf8" order deny,allow allow from all OwaReset LAZY OwaCharsize 4 OwaFlex package.procedure OwaHttp REST </Location> 

Before running httpd ORACLE_HOME, you must set NLS_LANG (ORACLE_SID also, if local). He needs access to Oracle Home using libclntsh.so. (Oracle client will do).

I just added oracle.conf (one line the full path to oracle home / lib) in /etc/ld.so.conf.d(+ ldconfig)

Truly scalable and cleaner tuning than OHS.

+3
source

My store is pretty much in the same situation as you. We also have very large applications based on mod_plsql / htp, and at some point they will have to transfer the data to Oracle REST data services.

We have been testing the ORDS configuration for quite some time, and our general conclusions are as follows:

  • only APEX applications are fully supported. Key Functionality
  • still available
  • harder to set up and maintain
  • slight decrease in performance
  • Some mod_plsql configuration options no longer exist or changed

The biggest problems that we face (and actually prevent us from switching to ORDS) are some limitations when using applications other than APEX (pure HTF / HTP). We have already filed several SRs because some functions in ORDS (for example, file upload and API loading) are available only when the APEX application starts.

+2
source

The biggest obstacle to solving the problem is setting up Oracle Rest Services (ORS) and ensuring its security. Once this is done, your web tooling applications will work the same. The URL may change slightly, so if you specified the URLs using full paths rather than relative paths, you might need to change the code.

I'm not sure that ORS is as powerful as Apache in areas like mod_rewrite, mod_proxy, virtual hosts with multiple IP addresses, etc.

+1
source

Source: https://habr.com/ru/post/982032/


All Articles