在今日之前,APEX应用可以通过两种方式访问(架构),即:

  1. Oracle HTTP Server/mod_plsql
  2. XDB HTTP protocol server/embedded PL/SQL gateway

今天,Oracle发布了Oracle Application Express Listener,这是很早以前就预告要在APEX下一版本(4.x)提供的主要新特性之一。通过APEX Listener,Web层增加了对以下平台的支持:

  1. Oracle WebLogic
  2. Tomcat
  3. OC4J

尽管11g内置了PL/SQL gateway可以当做一个逻辑上独立的Web Server来用,Oracle的技术顾问认为在应用规模不大的环境下,该方式比DB + Web Server的两层架构性能更佳,但是在我个人的测试下,发现并非如此。对于正式环境,我强烈建议使用独立的Web Server。

下面是一个Tomcat的配置指导:

  1. Download Tomcat
    Download
  2. Unpack Tomcat
  3. Edit the Tomcat configuration file to increase the maximum header size (the default is 4k). Edit ….\apache-tomcat-6.0.18\conf\server.xml
           <Connector port="8080" protocol="HTTP/1.1"
                      connectionTimeout="20000"
                      maxHttpHeaderSize="32676"
                      redirectPort="8443" />

    If you need to change the port from the default 8080, this would be done at the same time:

           <Connector port="8888" protocol="HTTP/1.1"
                      connectionTimeout="20000"
                      maxHttpHeaderSize="32676"
                      redirectPort="8443" />

    More information is available in the Apache Tomcat Configuration Reference.

  4. Extract the apex.war file from the apex_listener.zip (available for download on the APEX Listener Download Page) to …\apache-tomcat-6.0.18\webapps
  5. Start apache-tomcat-6.0.18\bin\startup.bat
  6. Visit http://localhost:8080/apex/Config
  7. Recursively copy the apex/images directory to ../apache-tomcat-6.0.18/webapps/ROOT/i

更多资料可访问网址:http://www.oracle.com/technology/products/database/application_express/index.html

P.S: 该产品目前还只是Early Adopter,非常非常前期的测试版,存在很多BUG。对于中文用户,如果页面中需要返回中文文字的消息,则可能会导致该消息乱码。在功能页面上,会返回类似
Error print success message checksum content error: ……
的错误。