Tuesday, September 30, 2014

Oracle SOA setCompositeInstanceTitle in 12c

After migrating the code from SOA 11g to 12C we found that setCompositeInstanceTitle was not working and we were not able to see the instance names in the enterprise manager console.

For setting the Composite Instance Name in a BPEL Process we used the Java BPEL exec extension.Below is the code which was working fine in 11g and not working in 12C but as per the documentation it is still supported for backward compatibility.



             <extensionActivity>  
              <bpelx:exec name="setTitle" language="java">  
               <![CDATA[String instanceTitle  = (String)getVariableData("title");   
                         setTitle(instanceTitle);      
                         setCompositeInstanceTitle(instanceTitle);]]>  
              </bpelx:exec>  
             </extensionActivity>  


As a work around we have changed this to setFlowInstanceTitle which is working fine and we are able to see the instance names in the EM console. Below is the working code.



             <extensionActivity>  
              <bpelx:exec name="setTitle" language="java">  
               <![CDATA[String instanceTitle  = (String)getVariableData("title");  
                         setFlowInstanceTitle(instanceTitle);]]>  
              </bpelx:exec>  
             </extensionActivity>  


This can be more powerful in tracking a  business flow that  consist of a single SOA composite application or multiple SOA composite applications.

Sunday, September 28, 2014

Oracle SOA Suite 12C installation

We had a requirement of installing Oracle SOA suite 12c in a single node and below are the steps we followed to set up the environment.


OS: Linux

We wanted to install Oracle HTTP Server instance in the DMZ to front-end the web Logic Server hosted in the application layer and hence did the standalone installation. The steps can be found here

If you would like to install java here are the steps we followed.


Directory strucutre

Below is the directory structure we had used.

ORACLE_HOME=/u01/oracle/products/soa_oracle_home
ORACLE_COMMON_HOME=/u01/oracle/products/soa_oracle_home/oracle_common
WL_HOME=/u01/oracle/products/soa_oracle_home/wlserver
ORACLE_SOA_HOME=/u01/oracle/products/soa_oracle_home/soa
EM_DIR=/u01/oracle/products/soa_oracle_home/em
JAVA_HOME=/u01/java/jdk1.7.0_65
DOMAIN_HOME=/u01/oracle/config/domains/soa_domain
MSERVER_HOME=/u01/oracle/config/domains/soa_domain
APPLICATION_HOME=/u01/oracle/config/applications/soa_domain
DEPLOY_PLAN_HOME=/u01/oracle/config/dp
OHS_ADMIN_CONF_DIR=/u01/oracle/config/domains/soa_domain/config/fmwconfig/components/OHS/instance_name
SOA_LOGS=/u01/oracle/config/domains/soa_domain/servers/wls_soa/logs
OSB_LOGS=/u01/oracle/config/domains/soa_domain/servers/wls_osb/logs
ESS_LOGS=/u01/oracle/config/domains/soa_domain/servers/wls_ess/logs
BAM_LOGS=/u01/oracle/config/domains/soa_domain/servers/wls_bam/logs

Installing and Configuring the Oracle Fusion Middleware Infrastructure


For installation of  SOA 12c, you need to get WebLogic 12c through the Oracle Fusion Middleware Infrastructure installation, which contains all required components for SOA.The standard Weblogic 12.1.3 Installer fmw_12.1.3.0.0_wls.jar, does not have the required JRF templates. The correct one is fmw_12.1.3.0.0_infrastructure.jar

Below error can be seen if the wrong file is used.


INST-07551: Not all depenedent featuresets for install type "SOA Suite"


                   





This screen verifies that your system meets the minimum necessary requirements.




Use this screen to verify the installation options you selected.


This screen appears when the installation is complete.




Click Finish to dismiss.



Installing the Oracle SOA Suite


Launch the installation program by invoking the java executable

$ java -jar fmw_12.1.3.0.0_soa.jar



Specify the location of your Oracle home directory


Select SOA Suite for creating the Oracle SOA Suite standard topology




When the progress bar reaches 100% complete, you can click Finish to dismiss the installer



Installing the Oracle Service Bus Software




Launch the installation program by invoking the java executable
java -jar fmw_12.1.3.0.0_osb.jar




Specify the location of your Oracle home directory.




Select Service Bus.


 Click Next when the progress bar completes 100%.




Click Finish.




Starting the Repository Creation Utility (RCU)


Navigate to the ORACLE_HOME/oracle_common/bin directory on your system. Ensure that the JAVA_HOME environment variable is set to the location of a certified JDK on your system

$export JAVA_HOME=/u01/java/ jdk1.7.0_55

$./rcu




Provide the database connection details for RCU to connect to your database.


Select Create new prefix and then select SOA Suite schema


 specify and confirm your passwords







Click Close to dismiss RCU.






Configuring the Oracle SOA Suite Domain

To begin domain configuration, navigate to the ORACLE_HOME/oracle_common/common/bin directory and start the WebLogic Server Configuration Wizard.

        ./config.sh


select the following templates


Select the location in which you want to store your applications associated with your domain


Specify the user name and password for the default WebLogic Administrator account for the domain

  Specify the Domain Mode and JDK


Enter the database details to connect to the database and Service Table (STB) schema to automatically retrieve schema information for the schemas needed to configure the domain.Click Get RCU Configuration when you are finished specifying the database connection information








Configure  the Administration Server Listen Address



Select Per Domain Default Location as the Node Manager type, then specify the Node Manager credentials.


Configure Managed Servers



Use the Machines screen to create a new machine in the domain.











Extending the Domain for Oracle Service Bus

Navigate to the ORACLE_HOME/oracle_common/common/bin directory and start the WebLogic Server Configuration Wizard.


Select osb.



Connect to the database and Service Table (STB) schema. The databse details will be pulled automatically from the existing domain files





On the Managed Servers screen, a new Managed Server named wls_osb  is created





Assigning Managed Servers to the machine




Starting the Node Manager & Servers


To start your per-domain Node Manager, go to the DOMAIN_HOME/bin directory and Start the Node Manager as shown below.
nohup sh startNodeManager.sh >nm.out&

Please note the location of the nodemanger script file has got changed and you will get an error as below if you try to start the node manager from the $WL_HOME/server/bin

<INFO> <Loading domains file: /u01/oracle/products/soa_oracle_home/oracle_common/common/nodemanager/nodemanager.domains>
<WARNING> <Domains file not found: /u01/oracle/products/soa_oracle_home/oracle_common/common/nodemanager/nodemanager.domains><Sep 28, 2014 4:13:31 PM GST>
<INFO> <Loading identity key store: FileName=/u01/oracle/products/soa_oracle_home/oracle_common/common/nodemanager/security/DemoIdentity.jks, Type=jks, PassPhraseUsed=true>
<SEVERE> <Fatal error in NodeManager server: Identity key store file not found: /u01/oracle/products/soa_oracle_home/oracle_common/common/nodemanager/security/DemoIdentity.jks>

To start the Administration Server create a Boot Identity File in $DOMAIN_HOME/servers/AdminServer/security with below entries.

cd $DOMAIN_HOME
mkdir -p servers/AdminServer/security
vi boot.properties
username=weblogic
password=password

This contents will be encrypted during the server startup.

Go to the DOMAIN_HOME/bin directory and start the server as follows.
nohup sh startWebLogic.sh &

Login to the console using http://adminserverhost:port/console and start the managed servers.