Oracle Forms 12.2.1.2.0 - Multiple Managed Servers via frmconfighelper

Posted by Dirk Nachbar on Monday, May 15, 2017 with 5 comments
In October 2016 I was blogging how to create multiple Oracle Forms 12c Multiple Managed Servers.
In case you are already on the latest Oracle Forms 12.2.1.2.0 Release, you can now create in a really comfortable way multiple Oracle Forms Managed Servers and deploy the necessary formsapp into your newly created Managed Server.

Since Oracle Forms 12.2.1 there is a small not really well know tool added to Oracle Forms - frmconfighelper. According the documentation (12.2.1.0.0 / 12.2.1.1.0 / 12.2.1.2.0) the frmconfighelper tool contains 5 functions (http://docs.oracle.com/middleware/12212/formsandreports/deploy-forms/GUID-AE8C9D19-BC55-4AD7-A6F0-A36843E3FE83.htm#FSDEP860) :
  • enable_ohs
  • deploy_app
  • update_app
  • enable_sso
  • enable_webgate
But when you call the frmconfighelper in Forms 12.2.1.2.0 you will find some functions which are not documented :-)

oracle@server> cd $ORACLE_HOME/forms/provision
oracle@server> ./frmconfighelper
using log file /home/oracle/frmconfighelper/logs/frmconfighelper_2017_05_15_20_49_31.log ..........
-----------------------------------------------------------------
   Forms configuration helper script                             
-----------------------------------------------------------------
 This script helps administrators perform some of the Forms      
 related configuration tasks                                     
                                                                 
**Important**: - Please backup the Weblogic domain before        
                 performing any administration tasks on it using 
                 this script.                                    
               - You can run enable_sso, enable_webgate          
                 and enable_sso_ssl options  only once.          
                                                                 
 frmconfighelper.sh <option> <arguments>                         
                                                                 
 options:                                                        
    - enable_ohs <domain-home> <ohs-instance> <forms-managed-server1-host> 
                 <forms-managed-server1-port> [<forms-managed-server2-host> 
                 <forms-managed-server2-port>..]                    
                                                                 
    - create_machine <wls-machine-name> <machine-host-name>      
                                                                 
    - create_managed_server <managed-server-name> <wls-machine-name> 
                            <managed-server-port> <standalone>   
                                                                 
    - deploy_app <new-context-root> <new-servlet-alias> <target>
                                                                 
    - update_app <new-context-root> <new-servlet-alias>
                                                                 
    - enable_sso <oam-host> <oam-port> <ohs-host> <ohs-port>     
                 <domain-home> <ohs-instance>                    
                                                                 
    - enable_sso_ssl <oam-host> <oam-port> <ohs-host> <ohs-ssl-port> 
                     <ohs-non-ssl-port> <domain-home> <ohs-instance> 
                                                                 
    - enable_webgate <domain home> <ohs-instance> 
                                                                 
    - help (or no option): prints help                           
                                                                 
-----------------------------------------------------------------
 options description:                                            
                                                                 
. . .
. . .

As you can see, under Oracle Forms 12.2.1.2.0 the frmconfighelper contains in reality 8 functions, so 3 more than documented:
  • create_machine
  • create_managed_server
  • enable_sso_ssl
Within this blogpost I will focus on the create_managed_server function in combination with the function deploy_app.

Lets say, you have a running Oracle Forms & Reports 12.2.1.2.0 environment with the 2 classical Managed Servers MS_FORMS & MS_REPORTS.
Now you are having the requirements to create a new Managed Server called MS_HR_APP for an independent Oracle Forms Application. Under Forms 11g you can achieve this by following the MOS Note 955822.1 which was not really straight forward. Now with Oracle Forms 12.2.1.2.0 you just need 2 commands :-)

The first command is using the function create_managed_server, which comes with following options:

  • create_managed_server:
    • managed-server-name: Managed server name - wls-machine-name : WLS machine name
    • managed-server-port: Managed server port number
    • standalone (optional): indicates standalone managed server which is not part of any cluster.
oracle@server> cd $ORACLE_HOME/forms/provision
oracle@server> ./frmconfighelper.sh create_managed_server MS_HR_APP AdminServerMachine 9010 standalone

running frmconfighelper.sh create_managed_server
using log file /home/oracle/frmconfighelper/logs/frmconfighelper_2017_05_15_21_33_56.log ..........

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

frmconfighelper.py output
-------------------------------b-e-g-i-n--------------------------------------------
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "AS_FRDEVEL" that belongs to domain "FRDEVEL".

Warning: An insecure protocol was used to connect to the server. 
To ensure on-the-wire security, the SSL port or Admin port should be used instead.

processCreateManagedServer
processing createManagedServer MS_HR_APP
createServer MBean: [MBeanServerInvocationHandler]com.bea:Name=MS_HR_APP,Type=Server
configuring standalone managed server
Target JRF components to "MS_HR_APP"
Copying JRF configuration files from /u00/app/oracle/product/fmw-fr-12.2.1.2.0/oracle_common/modules to /u00/app/oracle/user_projects/domains/FRDEVEL/config/fmwconfig/servers/MS_HR_APP
Update JRF changes to domain /u00/app/oracle/user_projects/domains/FRDEVEL in online mode
frmconfighelper.py script returning ...
------------------------------------------------------------------------------------
command :createManagedServer succeeded... 

-------------------------------e-n-d------------------------------------------------

Now we have created a new standalone Managed Server for our next step to deploy the formsapp into it by using an own context root and an own servlet alias. To deploy the formsapp we will use the function deploy_app from the frmconfighelper:
oracle@server> cd $ORACLE_HOME/forms/provision
oracle@server> ./frmconfighelper.sh deploy_app hrapp hrappservlet MS_HR_APP

running frmconfighelper.sh deploy_app
using log file /home/oracle/frmconfighelper/logs/frmconfighelper_2017_05_15_21_39_59.log ..........

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

frmconfighelper.py output
-------------------------------b-e-g-i-n--------------------------------------------
Please enter your username :weblogic
Please enter your password :
Please enter your server URL [t3://localhost:7001] :
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server "AS_FRDEVEL" that belongs to domain "FRDEVEL".

Warning: An insecure protocol was used to connect to the server. 
To ensure on-the-wire security, the SSL port or Admin port should be used instead.

processDeployApp
deploying the formsapp.dependencies library to target MS_HR_APP
<May 15, 2017 9:40:19 PM CEST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, oracle.formsapp.dependencieslib#12.2.1@12.2.1 [archive: /u00/app/oracle/product/fmw-fr-12.2.1.2.0/forms/j2ee/formsapp_deps.jar], to MS_HR_APP .> 
deploying custom Forms JavaEE application hrappapp
<May 15, 2017 9:40:20 PM CEST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, hrappapp [archive: /u00/app/oracle/product/fmw-fr-12.2.1.2.0/forms/j2ee/hrapp.ear], to MS_HR_APP .> 
frmconfighelper.py script returning ...
------------------------------------------------------------------------------------
command :deployApp succeeded... 

-------------------------------e-n-d------------------------------------------------
<May 15, 2017 9:40:23 PM CEST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.> 

When you login to your WebLogic Server Console, you will find under Domain Structure / Environment / Servers your newly created Managed Server MS_HR_APP, assigned to the Machine AdminServerMachine.



Under Domain Structure / Deployments you will find the newly deploy formsapp called hrappapp, which is targeted to the above created Managed Server MS_HR_APP:


Just start the above create Managed Server MS_HR_APP, the deployment will become active and you can open a browser and point to: http://servername:9010/hrapp/hrappservlet


Under the $DOMAIN_HOME/config/fmwconfig/servers/MS_HR_APP/applications/hrappapp_12.2.1/config directory you will find the standard configuration files for your Forms Applications, e.g. formsweb.cfg, default.env

Also you can configure your new formsapp via the Enterprise Manager Fusion Middleware Control http://servername:7001/em

Navigate via the Target Navigation to the Forms Tree and click on forms


And you will find the new formsapp called hrappapp:


The function create_managed_server in combination with deploy_app enables you to created quickly and stable and bullet-proofed multiple Oracle Forms Managed Servers including the required formsapp deployment including context root naming and alias servlet naming.



Reaktionen: