Oracle Froms application 的配置文件

  1. 云栖社区>
  2. 博客>
  3. 正文

Oracle Froms application 的配置文件

长烟慢慢 2013-10-26 19:02:52 浏览984
展开阅读全文

参考文档:https://forums.oracle.com/thread/2549379


1、Form Server 原理


1、查看当前有多少个forms Process (进程)

直接在os的apps用户(比如appltest用户)下,执行:

ps -ef | grep -i frmweb
ps -ef |grep frmweb | wc -l

[appldemo@test bin]$ ps -ef | grep -i frmweb
appldemo 10362  6699  0 11:19 ?        00:00:00 frmweb server webfile=HTTP-0,0,1,default,10.211.39.39
appldemo 11282 10016  0 13:33 pts/1    00:00:00 grep -i frmweb


2、查看当前forms server的运行状况:

进入:ORACLE_HOME/10.1.2/bin
检查: frmweb 可执行文件是否存在

os用户:

[appl02@vs009 bin]$ ps -ef|grep forms
appl02    9145  8716  0 Jul01 ?        00:00:42 /u01/VIS02/apps/tech_st/10.1.3/appsutil/jdk/bin/java -DCLIENT_PROCESSID=9145 -server -verbose:gc -Xmx256M -Xms64M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -(java路径,jvm内存大小

Djava.security.policy=/u01/VIS02/apps/tech_st/10.1.3/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/u01/VIS02/inst/apps/VIS02_vs009/ora/10.1.3/j2ee/forms/config/jazn.xml -Doracle.ons.oraclehome=/u01/VIS02/apps/tech_st/10.1.3 -Doracle.home=/u01/VIS02/apps/tech_st/10.1.3 -Doracle.ons.oracleconfighome=/u01/VIS02/inst/apps/VIS02_vs009/ora/10.1.3 -Doracle.ons.clustername=default -Doracle.ons.instancename=VIS02_vs009.vs009.hand-china.com -Dopmn.compatible=904 -Doracle.ons.indexid=forms.default_group.1 -Doracle.ons.numprocs=1 -Doracle.ons.uid=164178975 -Doracle.oc4j.groupname=default_group -Doracle.oc4j.instancename=forms -Doracle.oc4j.islandname=default_group -Doracle.opmn.routingid=g_rt_id -DOPMN=true -jar oc4j.jar -config /u01/VIS02/inst/apps/VIS02_vs009/ora/10.1.3/j2ee/forms/config/server.xml (配置文件)-properties -out /u01/VIS02/inst/apps/VIS02_vs009/logs/ora/10.1.3/opmn/formsstd.out -err /u01/VIS02/inst/apps/VIS02_vs009/logs/ora/10.1.3/opmn/formsstd.err -ports default-web-site:ajp:22010,rmi:20510,jms:23510



执行: frmweb -help=y
frmweb: error while loading shared libraries: libXm.so.2: cannot open shared object file: No such file or directory.


下面分析一下oracle forms server是如何运作的 assuming that the Forms Servlet is used to generate the initial HTML page. For simplicity, we assume the Web server is running on port 7777 on a computer called "mycomputer.com". We also assume no modifications have been made to the standard configuration created during the Oracle Application Server installation process.

When a user runs an Oracle Application Server Forms Services application, the following sequence of events occurs:

  1. The user starts up their Web browser and goes to a URL like the following:

    http://mycomputer.com:7777/forms/frmservlet?config=myapp&form=hrapp
    

    In this case, the (top level) form module to be run is called "hrapp" using the configuration section called "myapp".

  2. Oracle HTTP Server listener receives the request. It forwards the request to OC4J, since the path /forms/frmservlet matches one of the OC4J mount directives in the forms.conf file (the one for the Forms Servlet).(传递请求给OC4J,因为在forms.conf配置文件里定义了oc4j挂载路径就是/forms/frmservlet,我看到我自己环境里是:<IfModule mod_oc4j.c>

        Oc4jMount /forms              OC4J_BI_Forms
        Oc4jMount /forms/frmservlet   OC4J_BI_Forms
        Oc4jMount /forms/frmservlet/* OC4J_BI_Forms
        Oc4jMount /forms/lservlet     OC4J_BI_Forms
        Oc4jMount /forms/lservlet/*   OC4J_BI_Forms
    </IfModule>)
  3. OC4J maps the request to the Oracle Application Server Forms Services application (whose context root is /forms). It maps the request to the Forms Servlet (using the frmservlet mapping specified in the web.xml file).(oc4j把这个请求传给oracleAS Forms Service应用程序,然后再把这个请求传给Forms Servelet)

  4. The Forms Servlet (running in OC4J) processes the request as follows:

    • Opens the servlet configuration file (formsweb.cfg by default). If that parameter is not set, the default configuration file (ORACLE_HOME/forms/server/formsweb.cfg) is used.

    • Determines which configuration section to use in the formsweb.cfg file. Since the URL contains the query parameter config=myapp, the [myapp] section will be used.

    • Determines which baseHTML file to use, based on (a) what browser made the request, (b) what platform the browser is running on, and (c) the settings of various parameters in the formsweb.cfg file (specifically, baseHTMLie, baseHTMLjinitiator, baseHTMLjpi, baseHTML, and IE).

    • Reads the baseHTML file, and sends the contents back as an HTML page to the user's Web browser, after doing variable substitutions as follows:

Whenever a variable (like %myParam%) is encountered, the Forms Servlet looks for a matching URL query parameter (for example, &myParam=xxx), or, failing that, looks for a matching parameter in the formsweb.cfg file. If a matching parameter is found, the variable (%myParam%) is replaced with the parameter value.

For example, the baseHTML file contains the text %form%. In our example, this is replaced with the value "hrapp".

  1. Depending on which baseHTML file the Forms Servlet selected, the HTML page sent back to the Web browser will contain an Applet, Object or Embed tag to start up the Forms applet (thin client). The Forms applet runs in a JVM (either the Web browser's native JVM, or a "plugged in" JVM like Oracle JInitiator or Sun's Java plug-in).

  2. If the baseHTML file selected was for a plug-in (Oracle JInitiator or Sun's JDK Java plug-in), and if the user does not already have that plug-in installed on their computer, they are prompted to install the plug-in. In the case of JInitiator, the download location is under the virtual path /forms/jinitiator (a virtual path defined in the forms.conf file).

  3. In order to start up the Forms applet, its Java code must first be loaded. The location of the applet is specified by the applet codebase and archive parameters. For example, if the user is running with Oracle JInitiator, the applet code is loaded from the file http://mycomputer.com:7777/forms/java/frmall_jinit.jar

    The virtual path definition in the formsweb.cfg file for "/forms/java" allows the applet code to be loaded from the Web server.

    Note: The Forms applet code (for example, frmall_jinit.jar) is only to be loaded over the network the first time the user runs an Oracle Application Server Forms Services application (or if a newer version of Oracle Application Server Forms Services is installed on the Web server). Otherwise, it is to be loaded from the Web browser's (or the Java plug-in's) cache on the local disk.

  4. Once the Oracle Application Server Forms Services applet is running, it starts up a Forms session by contacting the Forms Listener Servlet at URL http://mycomputer.com:7777/forms/lservlet.

  5. The Oracle HTTP Server listener receives the request. It forwards the request to OC4J, since the path Ò/forms/lservletÓ matches one of the OC4J mount directives in the forms.conf file (the one for the Forms Listener Servlet).

  6. The Forms Listener Servlet (lservlet) starts up a Forms runtime process (frmweb.exe or frmweb) for the Forms session.

  7. Communication continues between the Forms applet (running in the user's Web browser) and the Forms runtime process, via the Listener Servlet, until the Forms session ends.

  8. The command line (such as giving the name of the form to run) is passed to the Forms runtime process. It is given as the applet parameter "serverArgs". Part of the serverArgs value in the baseHTML file was %form%, which was replaced by "hrapp". Therefore the runtime process actually runs the form in the file "hrapp.fmx".

    This file must either be present in the workingDirectory (which is specified in the Forms Web Configuration page of Application Server Control Console), or in one of the directories named in the FORMS_PATHenvironment setting, which is defined in the environment file (default.env by default). You can also specify the directory in the Forms Web Configuration page (for example, form=c:\<path>\myform).

  9. The Forms sessions end when one of the following occurs:

    • The top level form is exited (for example, by PL/SQL trigger code which calls the "exit_form" built-in function). In this case, the user is prompted to save changes if there are unsaved changes.exit_form(no_validate) exits the form without prompting.

    • The user quits their Web browser. In this case, any pending updates are lost.




2、配置文件


This section introduces the basic files you need to configure Forms applications. For more advanced configuration topics, see Chapter 4, "Configuring Forms Services".

This section contains the following:

  • Section 3.2.1, "Oracle Forms Configuration Files"

  • Section 3.2.2, "Oracle Application Server Containers for J2EE (OC4J) Configuration Files"

  • Section 3.2.3, "Oracle HTTP Listener Configuration Files"

  • Section 3.2.4, "Standard Fonts and Icons File"


    Note:

    Location of files are given relative to the ORACLE_HOME directory. Forward slashes should be replaced by back slashes on Windows.

3.2.1 Oracle Forms Configuration Files

Oracle Forms configuration files allow you to specify parameters for your Forms, which you manage through the Application Server Control Console. These configuration files include:

  • default.env

  • formsweb.cfg

  • base.htm, basejini.htm, and basejpi.htm

  • ftrace.cfg


    Note:

    If you manually edit any of the configuration or environment files, you'll need to restart Enterprise Manager so that Enterprise Manager can read all changes. If you do not restart Enterprise Manager, any changes that you make through Enterprise Manager will overwrite any manual changes you've made to these files.

3.2.1.1 default.env

Location: forms/server

This file contains environment settings for Forms runtime and can be found in the ORACLE_HOME/forms/server directory. On Solaris, default.env should include the PATH and LD_LIBRARY_PATH.

3.2.1.2 formsweb.cfg

Location: forms/server.

This is the Forms Servlet configuration file that contains the following:

  • Values for Forms runtime command line parameters, as well as the name of the environment file to use (envFile setting).

  • Most of the servlet configuration parameter settings that you set during installation. You can modify these parameters, if needed.

Variables (%variablename%) in the baseHTML file are replaced with the appropriate parameter values specified in the formsweb.cfg file and from query parameters in the URL request (if any).

You manage the formsweb.cfg file through Enterprise Manager Application Server Control Console.

For more information about formsweb.cfg, see, Chapter 4, "Configuring Parameters with Application Server Control Console".

3.2.1.3 base.htm, basejini.htm, and basejpi.htm

Location: forms/server.

The baseHTML files (base.htm, basejini.htm, and basejpi.htm) are used as templates by the Forms Servlet when generating the HTML page used to start up an Oracle Forms application.

We recommend that you make configuration changes in the formsweb.cfg file and avoid editing the baseHTML files. If you need to change the baseHTML files, create your own versions and reference them from the formsweb.cfg file by changing the appropriate settings.

For a look at a sample baseHTML files, see Appendix C, "base.htm, basejini.htm, and basejpi.htm Files".

3.2.1.4 ftrace.cfg

Location: forms/server.

This file allows you to configure Forms Trace. Forms Trace allows you to replace the functionality that was provided with Forms Runtime Diagnostics (FRD) and Performance Event Collection Services (PECS), which were available in earlier releases of Oracle Forms. Forms Trace allows you to trace the execution path through a form (for example, steps the user took while using the form).

You manage Forms Trace through Enterprise Manager Application Server Control Console.

For more information about ftrace.cfg, see Chapter 8, "Tracing and Diagnostics".

3.2.2 Oracle Application Server Containers for J2EE (OC4J) Configuration Files

By default Forms Services is configured for OC4J by deploying it as a J2EE compliant application packaged in an EAR (Enterprise Archive) file called formsapp.ear. This EAR file is deployed during the Oracle Application Server installation process (if you choose to configure Oracle Forms). During deployment, the EAR file is unpacked into the applications directory of the OC4J instance.

This section describes:

  • web.xml

  • Directory structure for Oracle Forms OC4J files

3.2.2.1 web.xml

Location: j2ee/OC4J_BI_FORMS/applications/formsapp/formsweb/WEB-INF/web.xml.

Once Forms Services has been installed and configured, the web.xml file is located in the directory j2ee/OC4J_BI_FORMS/applications/formsapp/formsweb/WEB-INF in ORACLE_HOME. It defines the aliases frmservlet and lservlet for the Forms Servlet and the Forms Listener Servlet.

For more information about web.xml, see Appendix C, "web.xml".

3.2.2.2 Directory structure for Oracle Forms OC4J files

During Oracle Application Server installation and configuration, the Forms EAR file (formsapp.ear) is deployed to the "OC4J_BI_FORMS" OC4J instance. This results in the following directory structure.

Names with a + sign are directories:

ORACLE_HOME/j2ee/OC4J_BI_FORMS/applications/formsapp 
+META-INF 
-application.xml (defines the structure of the ear file)
+formsweb 
+WEB-INF 
-web.xml (forms & listener servlet definitions, including servlet parameters) 
-orion-web.xml (virtual directory mappings and context parameter, only used in iDS) 
+lib 
       -frmsrv.jar (contains the Forms Servlet and Listener Servlet code)

3.2.3 Oracle HTTP Listener Configuration Files

This section describes the file used to configure Oracle HTTP Listener for Oracle Application Server Forms Services.

3.2.3.1 forms.conf

Location: forms/server.

This is the Oracle HTTP listener configuration file for Oracle Application Server Forms Services. It is included into oracle_apache.conf, which in turn is included into httpd.conf (the master HTTP listener configuration file). forms.conf defines virtual directories (aliases) and servlet mount points to map URL requests to the Forms Servlets running in the OC4J servlet engine.

For more information about forms.conf, see Appendix C, "forms.conf".

3.2.4 Standard Fonts and Icons File

This section describes the file used to configure font and icon settings for Oracle Application Server Forms Services.

3.2.4.1 Registry.dat

Location: forms/java/oracle/forms/registry

This file allows you to change the default font, font mappings, and icons that Forms Services uses.

For more information about Registry.dat, see Appendix C, "Registry.dat".

3.2.5 WebUtil Configuration Files

This section describes the files used to configure WebUtil at runtime. For information about using WebUtil at design time, see the Oracle Forms Online Help.

These files are only available in Oracle Developer Suite under Oracle_Home/forms/server directory. These files are not available with Oracle Application Server or with Oracle Application Server Forms and Reports Services.

  • Default webutil.cfg

  • Default webutilbase.htm

  • Default webutiljini.htm

  • Default webutiljpi.htm

3.2.5.1 Default webutil.cfg

Location: forms/server.

This file provides all of the configuration settings for webutil, including:

  • Logging Options

  • Installation Options

  • File Upload and Download Options

  • Server Side Logging Options for logging errors and log messages

For more information, see Appendix C, "Default webutil.cfg".

3.2.5.2 Default webutilbase.htm

Location: forms/server.

This is the default base HTML file for running a form on the Web using a generic APPLET tag to include a Forms applet with a certificate registration for WebUtil.

For more information, see Appendix C, "Default webutilbase.htm".

3.2.5.3 Default webutiljini.htm

Location: forms/server.

This is the HTML template file for running a form on the Web using JInitiator-style tags to include the Forms applet with a certificate registration for WebUtil.

For more information, see Appendix C, "Default webutiljini.htm".

3.2.5.4 Default webutiljpi.htm

Location: forms/server.

This is the default base HTML file for running a form on the Web using the JDK Java Plugin. This is used for example when running a form on the Web with Netscape on Solaris and a certificate registration for WebUtil.

For more information, see Appendix C, "Default webutiljpi.htm".

网友评论

登录后评论
0/500
评论
长烟慢慢
+ 关注