Monday, July 27, 2009

Form servlet and socket mode in R12

Oracle Applications Release12 by default configures Forms 10g stack in servlet mode, as this is the preferred and recommended deployment model for forms on the web. In this mode a java servlet called the Forms Listener Servlet manages the communication between the Forms Java Client and the OracleAS Forms Services. The Forms Listener Servlet communicates through the HTTP server port and does not need extra ports to handle the communication between the client and the Oracle Applicaiton Server, Forms Services

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 said above 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.

Listener executable name in 10g AS is frmsrv present in $ORACLE_HOME/bin.


How to check if form service is in servlet or socket mode:

To check if it is in servlet mode use 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


To check it is servlet from front end do,
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


TO check if it is 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

adformsrvctl.sh: check the logfile $ADMIN_LOG_HOME/ora/10.1.2/forms/socket.log for more information ...


To check it is socket from front end do,
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 steps to convert to socket mode:

1.Source the environment on the application tier.

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:
On UNIX:

$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:

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 user. Required only if -runautoconfig=Yes.


For example, on UNIX:

$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
-contextfile=$INST_TOP/appl/admin/mycontext.xml \
-mode=socket \
-port=9095 \
-runautoconfig=No
The script prompts for the parameters if they are not passed as command line arguments.


one more eg:
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode -contextfile=$INST_TOP/appl/admin/.xml -mode=socket -port=9001
-runautoconfig=Yes -appspass=


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:
On UNIX:
$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:


Carry out these steps to reenable Forms Servlet mode if Socket Mode is no longer required:

1.Source the environment on the application tier.

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:
On UNIX:

$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:

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 user. Required only if -runautoconfig=Yes.


For example, on UNIX:

$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
-contextfile=$INST_TOP/appl/admin/mycontext.xml \
-mode=servlet \
-runautoconfig=No



If Autoconfig was not automatically executed as part of the preceding step, then run AutoConfig on the application tier:
On UNIX:

$INST_TOP/admin/scripts/adautocfg.sh


4.Start all the application tier services:

$INST_TOP/admin/scripts/adstrtal.sh

5.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


Manually Starting Forms Server
On UNIX:

$INST_TOP/admin/scripts/adformsrvctl.sh start
Step 4.2: Manually Stopping Forms Server
On UNIX:

$INST_TOP/admin/scripts/adformsrvctl.sh stop
Step 4.3: Checking Status of Forms Server
On UNIX:

$INST_TOP/admin/scripts/adformsrvctl.sh status



Reference:384241.1

No comments: