Wednesday, April 10, 2013

Forms Servlet or Socket Mode?




https://blogs.oracle.com/stevenChan/entry/which_is_better_forms_servlet_or_socket_mode

Difference between forms Socket mode and Servlet mode

Posted: January 17, 2013 in Uncategorized
0
Oracle Forms can be run in either servlet mode or socket mode. 
  • Oracle Applications 11i is based on Forms 6i and is configured to run insocket mode by default. 
  • Oracle Applications 12i is based on Forms 10g and is configured to run inservlet mode by default.  

What is Forms Socket Mode?
The connection from the desktop client to the Forms Listener process was accomplished using a direct socket connection. 
  • The direct socket connection mode was suitable for companies providing thin client access to Forms applications within their corporate local area networks.
  • For the direct socket connection mode, the client had to be able to see the server and had to have permission to establish a direct network connection.
  • Although the direct socket connection mode is perfectly suited for deployments within a company’s internal network, it’s not the best choicefor application deployment via unsecured network paths via the Internet.
  • A company connected to the Internet typically employs a strict policy defining the types of network connections that can be made by Internet clients to secure corporate networks.
Oracle Applications Release12 by default configures Forms 10g stack inservlet 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 theOracle AS 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 Application Server Forms Services.
The Forms Servlet architecture is also compatible with web applications industry standards and supports different advanced network configurations such as Load balancing effortlessly.
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.
This may be required in the following situations:
  • Customers’ network topology is multimode and the Forms Services are configured on a node different from the node on which Web services (Web Entry Point and Web Applications) are configured.
  • Customers constrained by network bandwidth, or machine resources may consider socket mode as an alternative to improve performance.
  • To reduce network traffic. 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.
  • To reduce consumption of resources use by the JVMS needed in servlet mode architecture.
 Socket Mode Advantages
  1. Uses up to 40% less bandwidth than Forms servlet mode.  This may be perceived by Wide Area Network (WAN) users as causing slower responsiveness, depending upon network latency.
  2. Uses fewer application-tier JVM resources than servlet mode, due to fewer TCP turns and lack of overhead associated with HTTP POST handling.
Enabling Forms Socket Mode
Execute the following steps to switch from Forms Servlet mode to Forms Socket mode:
  1. Source the environment on the application tier.
  2. Stop all the application tier services using adstpall.sh
  3. Run the following command to enable Forms Socket Mode:
$FND_TOP/bin/txkrun.pl -script=ChangeFormsMode \
[-contextfile=<CONTEXT_FILE>] \
-mode=socket \
[-port=<Forms port number>] \
-runautoconfig=<No or Yes> \
-appspass=<APPS password>
ParameterDescription
-contextfileFull path to application tier context file, using the syntax:On UNIX:$INST_TOP/appl/admin/<CONTEXT_NAME>.xml
-modeservlet – to enable Forms Servlet mode. This is the default value.socket – to enable Forms Socket mode
-portPort 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.
-runautoconfigSpecify 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.
-appspassPassword for the applications user. Required only if -runautoconfig=Yes.
 4. 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
5. Start all the application tier services:
On UNIX:
$INST_TOP/admin/scripts/adstrtal.sh
6.Check whether Forms Server is running:
On UNIX:
$INST_TOP/admin/scripts/adformsrvctl.sh status
  1. Log in to Oracle Applications and  launch a Forms-based application.
  2. Open the Sun Java Console (from Tools Menu in Internet Explorer).
  3. Check whether the “mode” directive displayed in Sun Java Console when launching forms-based applications is set to socket.
  4. The direct launch URL for Forms Socket Mode is:
<web_protocol>://<web_host>.<web_domain>:<web_port>/OA_HTML/frmservlet
 What is Forms Servlet Mode?
The Forms Listener Servlet is a Java servlet that delivers the ability to run Oracle Forms applications over HTTP and HTTPS connections. It manages the creation of a Forms Server Runtime process for each client, as well as network communications between the client and its associated Forms Server Runtime process.
The desktop client sends HTTP requests and receives HTTP responses from the web server. The HTTP Listener on the web server acts as the network endpoint for the client, keeping other servers and ports from being exposed at the firewall. 
Servlet Mode Advantages
  1. HTTP and HTTPS traffic is easily recognizable by routers, while socket mode communications is generally considered suspect and treated on an exception basis. 
  2. Existing networking hardware can be used to support basic functions such as load-balancing and packet encryption for network transit.
  3. More resilient to network and firewall reconfigurations.
  4. More robust: servlet connections can be reestablished if network connections drop unexpectedly for Forms, Framework, and JSP-based pages.
  5. Is the only supported method for generic Oracle Forms customers, and therefore is more thoroughly tested by the Forms and E-Business Suite product groups.
  6. Performance traffic can be monitored via tools like Oracle Real User Experience Insight (RUEI).
  7. Socket mode is not supported on Windows-based server platforms.
Enabling Forms 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:
On UNIX:
$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=<CONTEXT_FILE>] \
[-mode=servlet] \
-runautoconfig=<No or Yes> \
-appspass=<APPS password>
ParameterDescription
-contextfileFull path to application tier context file, using the syntax:On UNIX:$INST_TOP/appl/admin/<CONTEXT_NAME>.xml
-modeservlet – to enable Forms Servlet mode. This is the default value.socket – to enable Forms Socket mode
-portPort 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.
-runautoconfigSpecify 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. 
4.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
5. Start all the application tier services:
On UNIX:
$INST_TOP/admin/scripts/adstrtal.sh
  1. Log in to Oracle Applications and  launch a Forms-based application.
  2. Open the Sun Java Console (from Tools Menu in Internet Explorer).
  3. Check whether the “mode” directive displayed in Sun Java Console when launching forms-based applications, is set to http,native
  4. Direct Forms Servlet Launch is:
web_protocol>://<web_host>.<web_domain>:<web_port>/forms/frmservlet
Step 4.1: 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
Switching Apps Deployments between Modes
Due to its numerous advantages, Forms servlet mode is the preferred and recommended deployment model for Forms on the web. 
There may be circumstances where you need to switch between the default Forms modes.  You might wish to switch your Oracle E-Business Suite Release 12 environment to socket mode to improve performance or reduce network load.  You might wish to switch your Apps 11i environment to servlet mode as part of your rollout to external web-based end-users outside of your organization.
If you’re running Apps 11i and would like to switch to servlet mode, see:
If you’re running Apps 12 and would like to switch to socket mode, see:


Forms listener servlet diagram showing firewalls desktop client and oc4j container on application tier

No comments:

Post a Comment