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) :
As you can see, under Oracle Forms 12.2.1.2.0 the frmconfighelper contains in reality 8 functions, so 3 more than documented:
The first command is using the function create_managed_server, which comes with following options:
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:
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.
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
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.
Categories: Oracle Forms 12c, Oracle WebLogic Server 12c
interesting post - must check that immediately ... ;-)
ReplyDeleteHi,
ReplyDeletemy main problem with frmconfighelper is the way it handles jar files.
Using the deploy_app command it packages all jar files from ..../forms/java/*.jar into the resulting ear file.
Everything works as expected.
But if you add (or change) a jar file in .../forms/java/ later on, your new Managed Server won't be aware of this and you can't use the additional jar file.
As a workaround I copy the new jar file directly into the dirctory structure of the extracted ear file ...../forms-TST1app_12.2.1/r24rx5/java/.
But this is not an acceptable solution.
I opened a Oracle SR in Dec. 2016 on this problem.
But that time I was using Forms 12.2.1.1 and they simply told me, that in the already available version 12.2.1.2 frmconfighelper was changed.
A few days ago I started to work again on this problem and analyzed frmconfighelper in version 12.2.1.2.
The problem still exists.
Would be great, if you could take a look at this.
Regards,
Tobias Muehlhuber
Hi,
ReplyDeleteI ran further tests on frmconfighelper:
If you change jar files in .../forms/java/ (e.g. add custom jar files or maybe changed due to patch/update) you'll have to run frmconfighelper.sh update_app ...
But this command only recreates forms-TST1.ear, but there is no redeployment of the recreated forms-TST1.ear.
A restart of the Managed Server or a restart of the complete Weblogic-Server does not trigger a redeploy of the new forms-TST1.ear.
You'll have to redeploy forms-TST.ear using WL console or wlst.
Regards,
Tobias Muehlhuber
Hi Tobias,
ReplyDeleteI experience the same, when you are using deploy_app and before you are copying your required jar's into $MW_HOME/forms/java, all your personal jar's get packed and deployed on your Managed Server, so far so good.
But when you are later in the need to update e.g. icons.jar with some new gif's, you have to execute the complete procedure again, remove your deployed formsapp, re-run the deploy_app and you will get your e.g. updated icons.jar file, but then also all your configurations in the formsweb.cfg and so on are gone :-(
Cheers
Dirk
Hi Dirk,
ReplyDeletefrom my understanding you do not have to remove your deployed formsapp. Having added e.g. some gifs to Icons.jar you just have to call "frmconfighelper.sh update_app". This creates a new formsapp.ear. Then you have to redeploy this formsapp.ear using WL console or wlst. This way you won't loose all your configurations.
From my point of view Oracle simply forgot to add the redeploy command in the update_app() of frmconfighelper.sh.
And I do not understand the advantage of adding all the jar files to the EAR-file.
Regards,
Tobias