Servlet mode to Socket mode in R12 Form


Oracle Apps R12 Forms : Servlet or Socket


Default Forms connection mode in Oracle Applications R12 is "SERVLET" where as in Oracle Apps
11i default form connection mode is "SOCKET”.



1. What is difference between socket and servlet mode in Forms ?

Java servlet handles communication between forms client (java based) and Oracle Forms Service (10g). All connection is via HTTP Server so there is no need to start form server and no need to open form server port between client machine and application tier. More secure as compared to Forms Socket Mode. Network traffic is more so little bit network bandwidth hungry when compared with SOCKET mode. In Servlet mode no additional certificate is required during SSL implementation for application tier, single certificate will handle both forms & web connection.

2. What are advantages and disadvantages of each?


(i) Simple SSL Configuration in case of servlet (as no separate ssl configuration is required for Forms as connections are via web/http server)
(ii) No port needs to open to access forms in firewall in case servlet.
(iii) Servlet is more secure method of deployment over Internet.
(iv) Result is more network traffic because of HTTP than socket (dedicated) so not preferred in WAN implementation.

3. Can we change default R12 forms mode from servlet to Socket and vice versa?

Yes , we can change R12 forms mode from servlet to socket and vice versa.
Although Forms Servlet is the preferred deployment method, there may be circumstances where customers need to switch from forms Servlet mode to forms Socket mode, which allows desktop clients to access the Forms Server directly. Also to reduce network traffic as the servlet mode uses HTTP protocol on each transaction between a client and the Forms Server requiring the exchange of cookies and http headers, which increases, network traffic.

First we need to check if form service is in servlet or socket mode by issuing below command from backend:

$ ./adformsctl.sh status

You are running adformsctl.sh version 120.12.12000000.3

Not starting the Forms OC4J instance as Forms connect mode is set to socket.
adformsctl.sh: exiting with status 1

We can check it from front end also as follows.
Log in to Oracle Applications and launch a Forms-based application. Open the Sun Java Console (from Tools Menu in Internet Explorer).
Check whether the "mode" directive displayed in Sun Java Console when launching forms-based applications, is set to HTTP. Direct Forms Servlet Launch is: web_protocol>://.:/forms/frmservlet

How to check if form is in socket mode from backend:

 $ ./adformsrvctl.sh status
You are running adformsrvctl.sh version 120.9.12000000.7
Checking status of FORMS Server (Socket Mode) ...
 Forms Server (Socket) is running as PID 8352 adformsrvctl.sh: exiting with status 0

We can check the logfile which is at
$ADMIN_LOG_HOME/ora/10.1.2/forms/socket.log for more information.

To check if it is socket from front end do as follows Log in to Oracle Applications and launch a Forms-based application. Open the Sun Java Console (from Tools Menu in Internet Explorer).
Check whether the "mode" directive displayed in Sun Java Console when launching forms-based applications is set to socket. The direct launch URL for Forms Socket Mode is: ://.:/OA_HTML/frmservlet Manually Starting/stoping/status of Forms Server in socket mode:

 $INST_TOP/admin/scripts/adformsrvctl.sh start
$INST_TOP/admin/scripts/adformsrvctl.sh stop
$INST_TOP/admin/scripts/adformsrvctl.sh status

Step by step to convert from Servlet mode to Socket mode:

 1.Source the environment on the application tier. $. ./PROD_erp.env
2.Stop all the application tier services: $INST_TOP/admin/scripts/adstpall.sh

3.Run the following command to enable Forms Socket Mode: $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \ [-contextfile=] \ -mode=socket \ [-port=] \ -runautoconfig= \ -appspass=
Parameter Description -contextfile :

 Full path to application tier context file, using the syntax:
 $INST_TOP/appl/admin/.xml -mode servlet - to enable Forms Servlet mode.

This is the default value. -socket - to enable Forms Socket mode -port : Port number used to run Forms in socket mode. The default port number is 9095. A port number is not needed if servlet mode is used. -runautoconfig : Specify whether AutoConfig should be run after changing the forms mode. Possible values are as follows: No : Do not run AutoConfig after enabling Forms servlet/socket mode. This is the recommended value.
Yes : Run AutoConfig after enabling Forms servlet/socket mode. -appspass :Password for the applications.

Take an example:
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \ -contextfile=$INST_TOP/appl/admin/mycontext.xml \ -mode=socket \ -port=9095 \ -runautoconfig=No



Please Note :The script prompts for the parameters if they are not passed as command line arguments. If Autoconfig was not automatically executed as part of the preceding step, then we need to run AutoConfig on the application tier: $INST_TOP/admin/scripts/adautocfg.sh

4.Start all the application tier services: $INST_TOP/admin/scripts/adstrtal.sh

5.Check whether Forms Server is running: $INST_TOP/admin/scripts/adformsrvctl.sh status Log in to Oracle Applications and launch a Forms-based application. Open the Sun Java Console (from Tools Menu in Internet Explorer). Check whether the "mode" directive displayed in Sun Java Console when launching forms-based applications is set to socket.
The direct launch URL for Forms Socket Mode is:
://.:/OA_HTML/frmservlet


Step by steps to convert to servlet mode:


 If form Socket mode is no longer needed, then follow the step by step to convert form connection from socket mode to servlet mode.
1.Source the environment on the application tier. $. ./PROD_erp.env
2.Stop all the application tier services: $INST_TOP/admin/scripts/adstpall.sh 3. Run the following script to disable Forms Socket Mode and re-enable Forms Servlet Mode: $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \ [-contextfile=] \ [-mode=servlet] \ -runautoconfig= \ -appspass=



Parameter Description -contextfile : Full path to application tier context file, using the syntax:

$INST_TOP/appl/admin/.xml -mode servlet - to enable Forms Servlet mode.
 This is the default value. -socket - to enable Forms Socket mode -port : Port number used to run Forms in socket mode. The default port number is 9095. A port number is not needed if servlet mode is used. -runautoconfig : Specify whether AutoConfig should be run after changing the forms mode. Possible values are as follows: No : Do not run AutoConfig after enabling Forms servlet/socket mode. This is the recommended value.
Yes : Run AutoConfig after enabling Forms servlet/socket mode. -appspass :Password for the applications.
Take an example: $FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \ -contextfile=$INST_TOP/appl/admin/mycontext.xml \ -mode=servlet \ -runautoconfig=No

Please Note:If Autoconfig was not automatically executed as part of the preceding step, then run AutoConfig on the application tier:
 $INST_TOP/admin/scripts/adautocfg.sh
4.Start all the application tier services: $INST_TOP/admin/scripts/adstrtal.sh

5.Check whether Forms Server is running: $INST_TOP/admin/scripts/adformsrvctl.sh status Log in to Oracle Applications and launch a Forms-based application. Open the Sun Java Console (from Tools Menu in Internet Explorer). Check whether the "mode" directive displayed in Sun Java Console when launching forms-based applications is set to http,native.
Direct Forms Servlet Launch is: web_protocol>://.:/forms/frmservlet

No comments:

SHRD0014: GLLEZL - process exiting with failure

  SYMPTOMS Journal Import completes with the following error: Error ------ ORA-01653 : unable to extend table GL.GL_IMPORT_REFERENCES ORA-01...