Showing posts with label Oracle SOA Suite. Show all posts
Showing posts with label Oracle SOA Suite. Show all posts

Friday, April 1, 2011

Oracle Service Bus (11.1.1.4.0) on Ubuntu 10.10, deployment into ESXi Virtual Infrastructure

In our previous article, we installed Oracle SOA Suite PS3 into a host on a Virtual Infrastructure.

This article discusses the installation of Oracle Service Bus 11.1.1.4.0 into the same middleware home of the SOA Suite. This is possible because Oracle has released OSB 11g as a component of SOA Suite of products. OSB 11g PS3 and SOA Suite 11g PS3 shares the same Oracle Weblogic Server version, 10.3.4.

Pre-requisite:
- Minimum swap space = 512MB. Instructions to add file-based swap space is available here.
- Java Runtime Environment. Reuse the one from previous installation of Oracle Service Bus
- NFS mount to the existing Oracle installation file system.
- oracle user account and oinstall group are created on the target host. Ensure identical uid and gid (in this case, 500 and 1001 respectively)

Required binary
- ofm_osb_generic_11.1.1.4.0_disk1_1of1.zip downloadable from Oracle website.

Installation Steps:
- unzip downloaded files to a temp folder. You will get 2 directories after unzip. Disk1 and Disk2
- cd to Disk1
- execute runInstaller. When asked for java directory, use the one (either Sun JDK or JRockit) installed in WLS.
- select the previously created middleware home of SOA Suite 11.1.1.4.0. This reduces the installation footprint because it contains the Oracle WebLogic Server 11gR1 (10.3.4) and the optional component Oracle Enterprise Pack for Eclipse (OEPE) required by the OSB 11.1.1.4.0. The other middleware home (of Weblogic Portal, wlpmw) cannot be used because it contains Oracle Weblogic Server 10.3.2 which is not compatible with SOA PS3/OSB PS3.

Oracle Server Bus OSB Installation Screens













Upon completion of OSB installation in a SOA Suite middleware home, the following elements are added to the inventory.xml file in the oraInventory/ContentsXML directory.


    
       
    

 

The following image depicts the summary of the resultant directory structure after WLS and SOA installations.
The final step is to make sure your operating environment has the right variables set up.As root,
#vi /etc/bash.bashrc
Add the following lines
export ORACLE_BASE=/u01/app/oracle
export MW_HOME=$ORACLE_BASE/product/soamw
export WLS_HOME=$MW_HOME/wls_10.3
save the file.

VoilĂ , Oracle Service Bus in the same home as SOA Suite.

Happy OSB'ing,

Monday, March 21, 2011

Oracle SOA Suite PS3 (11.1.1.4.0) on Ubuntu Linux 10.10 Installation Guide (includes Optimal Flexible Architecture)

We will be looking at the installation of Oracle SOA Suite PS3 (11.1.1.4.0) on Ubuntu Linux 10.10. I have stretched the installation scope a little bit by installing the SOA Suite of products into an existing Oracle OFA (Optimal Flexible Architecture) that contains an existing Oracle Database 11g installation.

Oracle has recommended a UNIX file structure (known as Optimal Flexible Architecture, OFA) for Oracle Database installation and is documented in the Oracle Database Installation Guide.

In our example, we install Oracle SOA Suite 11.1.1.4.0 into the directory structure of an existing Oracle Database 11.2.0.1.0.

Pre-conditions
1) You must have an existing oracle database installation, on a file directory structure compliant to Optimal Flexible Architecture (OFA). For instructions to install Oracle Database 11g, please refer to this article.
2) Both servers (Oracle Database server and Oracle Service Bus server) must share the common oracle user and oinstall group with identical uid and gid. You can implement this either with NIS (the yellow pages, yp), NIS+, rsync or LDAP. The latter is the preferred but I will leave this exercise to a separate article. For now, just create the oracle user and oinstall group manually on the SOA Suite host.
3) Both server should mount the NFS exported file system using the same convention, either u01 or disk01 as recommended by Oracle. On my machine, I mapped the exported FS by specifying the following in /etc/mtab file.

192.168.50.100:/mnt/home_shared/sharedvol/u1 /u01 nfs rw,hard,intr,addr=192.168.50.100 0 0

SOA Suite Installation requires at least 512MB of swap space. If your default swap partition has less space than that, then the easiest way to increase the swap space is to follow the instructions here. I have my Ubuntu 10.10 Standard Operating Environment created with 1GB of swap partition and export it as a ESX ova template and re-use it for all my Oracle product installation.

Given that the target host is a multi-homed host, with a NIC for application and another for storage, I have updated the /etc/hosts file to ensure the hostname resolved into the correct IP address.

172.16.20.50    orasoa1.a.kein.com   orasoa1
127.0.0.1       localhost.localdomain   localhost

Bill of Materials
1) Oracle Weblogic Server 10.3.4 (wls1034_oepe111161_linux32.bin)
2) Oracle SOA Suite PS3 11.1.1.4.0 (ofm_soa_generic_11.1.1.4.0_disk1_1of2.zip, ofm_soa_generic_11.1.1.4.0_disk1_2of2.zip)

The following are typical steps to installing Oracle SOA Suite onto your target machine.

1) First, you must install Oracle Weblogic Servier 10.3.4 as oracle user.

ORACLE_BASE = /u01/app/oracle
MW_HOME = /u01/app/oracle/product/soamw
We don't need support do we?

Select the 'Typical' option, we will develop something on this installation
WLS_HOME = /u01/app/oracle/product/soamw/wls_10.3
3) Install Oracle SOA Suite PS3 (11.1.1.4.0)

Unlike SOA Suite PS2 (11.1.1.3.0) which needs to be installed on top of SOA Suite 11.1.1.2.0, PS3 can be installed as a standalone package. As oracle user, unzip ofm_soa_generic_11.1.1.4.0_disk1_1of2.zip and ofm_soa_generic_11.1.1.4.0_disk1_2of2.zip into your /home/oracle folder.

5 folders (Disk1, Disk2, Disk3, Disk4 and Disk5) will be created after unzip operation. cd into Disk1 and execute runInstaller. When asked for JRE/JDK location, use the one installed with WLS. (wither Sun JKD or JRockit)

oracle@orasoa1:~/Disk1$ ./runInstaller

Checking if CPU speed is above 300 MHz.    Actual 3296 MHz    Passed
Checking Temp space: must be greater than 150 MB.   Actual 1583 MB    Passed
Checking swap space: must be greater than 512 MB.   Actual 1023 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 65536    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-29_11-49-15PM. Please wait ...
Please specify JRE/JDK location ( Ex. /home/jre ), /bin/java should exist :/u01/app/oracle/product/soamw/jrockit_160_22_D1.1.1-3

If you see the following error on the console, you can ignore them (do nothing about them)

oracle@orasoa1:~/Disk1$ [WARN ][jrockit] MaxPermSize=512m ignored: Not a valid option for JRockit
Log: /u01/app/oraInventory/logs/install2011-03-29_11-49-15PM.log
sh: /bin/rpm: not found
sh: /bin/rpm: not found

SOA Suite Installation Screens

Select the existing oraInventory of previous product installation




Click 'Continue' to ignore the result of failed pre-requisite checks

Specify the existing middle home (soamw) created during installation of Weblogic Server in Step 1 above.
MW_HOME=/app/oracle/product/soamw

The installer detected a compatible Weblogic Server version already exist in the selected MW_HOME

Start the installation process by clicking the 'Install' button


Click 'Next' to finish the installation
Click 'Finish' to complete the installation
Note that after the installation of SOA Suite, the inventory.xml file under the ContentsXML folder in oraInventory is updated to include the following entries.


   
      
   


   
      
   


The following image depicts the summary of the resultant directory structure after WLS and SOA installations.

The final step is to make sure your operating environment has the right variables set up.

As root,

#vi /etc/bash.bashrc

Add the following lines

export ORACLE_BASE=/u01/app/oracle
export MW_HOME=$ORACLE_BASE/product/soamw
export WLS_HOME=$MW_HOME/wls_10.3

save the file.

Deployment Summary

Server Configuration

Server Name
IP Address
Gateway
OS
CPU #
RAM
orasoa1.a.kein.com
eth0 - 172.16.20.50
eth1 - 192.168.50.50
172.16.20.1
-
Ubuntu Linux 10.10
1
1GB

Software Configuration

Component
Application location
Data files location
Comments
Oracle Weblogic Server 10.3.4
/u01/app/oracle/product/soamw/
-

Oracle SOA Suite   11.1.1.4.0
/u01/app/oracle/product/soamw/
-


Storage Configuration

File System
Mounted On
Available Space
192.168.50.100:/mnt/sharedvol/shared/u1
/u01
1 TB

VoilĂ , Oracle SOA Suite on OpenFiler NFS.

Happy SOA'ing.

Wednesday, October 13, 2010

Consuming TIBCO EMS Topic Message from Oracle SOA 11g Application

The previous article describes how FileGateway publishes its data transformation completion event. We will see in this article how another application consumes this event.

In this example, we will create a simple Oracle SOA 11g Application that contains a JMS listener and a file writer.

The use case
Trigger:
JMS Message arrives in FGW.FILEREADY topic.

Flow:
1. JMS adapter receives message.
2. Mediator component maps the input (JMS body) to the input of a File Adapter.
3. File adapter writes the JMS message body into a local file.
4. End of use case.

The Steps
1. Create an empty Oracle SOA 11g Application. Name it as DataLoader. Create a new project called WaitFile within DataLoader. Ensure the fileInfo.xsd created in the previous article is included in this project.

Figure 1: Empty Oracle SOA Application in JDeveloper, with fileInfo.xsd

2. Configure the JMS Adapter
Double click on the composite.xml to open the composite editor. From the "Component Palette" on the right, drag the "JMS Adapter" into the "Exposed Services" pane of the composite editor.

Configure the following:
  • In Step 2 - Service name: WaitFile
  • In Step 3 - Select Third Party JMS Provider
  • In Step 4 - JMS Connection JNDI Name: eis/tibjmsDirect/Topic
  • In Step 5 - Select Define from operation and schema (specified later)
  • In Step 6 - Operation Type: Consume Message, Operation Name: Consume_Message
  • In Step 7 - Destination Name: FGW.FILEREADY. This is the topic name defined in the TIBCO EMS.
  • In Step 8 - Browse for fileInfo in the xsd file.WaitFile
    • Figure 2: Browse Message Schema
    • In Step 9 - Click Finish

    3. Configure the File Adapter
    From the "Component Palette" on the right, drag the "File Adapter" into the "External Refereces" pane of the composite editor.

    Configure the following:
    • In Step 2 - Service name: WriteFileInfo
    • In Step 3 - Select Define from operation and schema (specified later)
    • In Step 4 - Operation Type: Write File, Operation Name: Write
    • In Step 5 - Directory for Outgoing File (physical path): C:\. File Naming Convention (po_%SEQQ%.txt): fileInfo_%SEQ%.txt
    • In Step 6 - Browse for fileInfo in the xsd file.WaitFile
    • In Step 7 - Click Finish

    4. Configure the Mediator
    From the "Component Palette" on the right, drag the "Mediator" into the "Components" pane of the composite editor.

    Configure the following:
    • Name: Mediator1
    • Template: Define Interface Later
    • Click the OK button

    5. Wiring the service, component and reference in the composite.



    Figure 3: Wired service, component and reference

    6. Configure the Mediator
    Double-click the "Medialtor1" component to bring up the mapper. Create a new mapper file, accept the default file name.


    Figure 4: Create new transformation map


    Drag to map the entire source node (imp1:fileInfo) to target node (imp1:fileInfo)

    Figure 5: Mapped source and target

    7. Configure the JMS Module in Oracle SOA Admin Server console
    Make sure your SOA Admin server is started for your domain. Point your browser to http://localhost:7001/console assuming your server runs locally.

    Under the "Domain Structure" menu, click on the "Deployments" menu. Locate the "JmsAdapter" in the Deployments table. Click on the "JmsAdapter", the setting page of "JmsAdapter" is displayed.

    Figure 6: Domain Structure -> Deployments

    Instead of creating a new JMS connection pool, we will just modify the existing pool, for the sake of simplicity. You can always create your own connection pool dedicated to consuming messages from the FileGateway.

    Click on the Configuration tab, then the Outbound Connection Pools sub-tab. Then click on the "eis/tibjmsDirect/Topic"


    Figure 7: Outbound Connection Pool table

    In the "Properties" tab of "eis/tibjmsDirect/Topic", enter the required parameter values for FactoryProperties, Password and Username, then click "Save"

    Figure 8: Connection pool property configuration

    You need to re-deploy the JmsAdapter for the change to be effective. The changes you have made will be stored in a deployment plan.

    Back to the "Deployments" menu. Check the checkbox to the left of "JmsAdapter" and click the "Update" button at the top of the "Deployments" table. Re-deploy the application, create a new plan if necessary.

    Figure 9: Update JmsAdapter deployment

    Figure 10: Deployment plan

    Figure 11: Deployment plan

    8. Deploy the WaitFile SOA 11g application into the soa_server1. (assuming you have created a soa managed server)

    Figure 12: WaitFile composite deployed

    9. Start TIBCO EMS server (make sure you have carried out the steps described in this article). Run FileGateway in TIBCO Designer test mode. A JMS message should be sent out as soon as the data transformation is completed.

    10. Inspect the execution trail and instance information in the dashboard of WaitFile composite.

    Figure 13: Dashboard

    11. Inspect the File adapter output file in the output directory.
    We configured the file adapter to output in c:\, so you should find a file "fileInfo.txt" under this folder. Open the file and inspect the content, you should get something like this.

    
       EMP-OUT00A-20101013-10-21-56.XML
       1646
       2010-10-13T10:21:56.296+11:00
       
          
          
          
          
       
    
    

    Voila, that is a proof of concept of how to connect to and consume JMS message of a TIBCO JMS topic from an Oracle SOA 11g Application.

    Download the Oracle SOA 11g Application source code (JDeveloper project) here.

    Cheers,