Monday, 28 December 2015

Oracle SOA 12.2.1 Step by Step Installation of Standalone Server in Windows

In this post, I will show you step by step installation of Oracle SOA 12c (12.2.1) on window 7.

Prerequisites
  1. Install Oracle JDK (JDK1.8.0_65) and Setup JAVA_HOME environment variable.
  2. Install Oracle XE 11g Database (we don’t have XE for 12C)
  3. Download Oracle SOA 12c installer (12.2.1.0.0).
Step 1: Install SOA 12.2.1 Software
Open the cmd prompt, right-click on it and run it as administrator
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQTsKa0id9y1g89thNuRaGSilHyXGIOmkn6g7jR71phYS26ftUmBNKjUrVjYsTMNTd2I1j7cmBW0f2SB93cfAddUr5BxhH3Bxg1gxPJrWVl1Xb8qkzHN21lLB38jiTC6jAWnewscKiDBx2/s1600/Oracle_SOA_12c_Installation_cmd.png


Go to Oracle SOA executable jar folder and run below command in command prompt.
%JAVA_HOME%\bin\java.exe -jar fmw_12.2.1.0.0_soa_quickstart.jar


You see window of quick start installation, click on next
Provide the SOA Directory Location, then click next


Step 2: Install RCU
You need to create the required schemas using RCU before proceeding with domain creation.
Navigate to $MW_HOME/oracle_common/bin. Locate file rcu.bat and select ‘Run as Administrator’ on right click to bring up the following welcome screen. Make sure that you installed a supported database before proceeding.







Step 3: Domain Creation
Navigate to $MW_HOME/oracle_common/common/bin and locate the file config.cmd. Right click and select ‘Run as Administrator’ to bring up the following screen. Enter your desired domain name.




Click Next and select the products that your domain want to support.


Provide the Domain Name
Click Next and enter the credentials.
Click Next and choose Domain Mode. You may want to retain Development as Domain Mode. You can accept defaults for JDK or you can select any other location.
Click on Manual Confugiration
Click Next. Enter schema information as shown below and click Get RCU Configuration.


Click next
Below are the configurations to maintain different Admin, SOA and Service bus servers.


Starting Admin Server



Below is the Manual Start of OSB Server, instead you can you Node Manager and skip below start

Start OSB Server





Monday, 21 December 2015

Oracle SOA 12.2.1 Installation - Create Service Bus Domain using WLST Script

Oracle SOA 12.2.1 Installation provide sample wlst script to create Service bus Domain.

The script is available in below location

%MW_HOME%\osb\common\wlst\create_samples_domain.py


To create the domain, open the cmd prompt as Admin, run the below command

C:\Oracle\Middleware\Oracle_Home\oracle_common\common\bin\wlst.cmd %MW_HOME%\osb\common\wlst\create_samples_domain.py



Note: All the configurations (Domain Name,Listening port, Password etc) are preloaded in the create_samples_domain.py script. If require, you can modify the script with your configurtion.

Default Settings
-------------------
Domain: ServiceBusSamples
port:        7021
domain location: C:\Oracle\Middleware\Oracle_Home\user_projects\samples\domains\servicebus

To start the server, go to the domain location and run the startWeblogic.bat script.




 The Domain is pre-loaded with sample OSB Project.
You can test the sample from below url

http://localhost:7021/examplesWebApp/index.jsp



Next, i will be posting Oracle SOA 12.2.1 installation and configuring standalone server


Friday, 1 May 2015

Find and Replace JCA properties for Service Bus 12C / OSB 11G using Maven



We can create and edit a customization file in which we can only replace Proxy Service/Business Service artifacts and some JCA properties like JCA Always Use JCA File Flag, JCA Connection Mode.







But in real time scenarios, we are required to modify JCA properties such as PhysicalDirectory/LogicalDirectory/JNDI Location which is not possible using OSB customization file



Using "maven-replacer-plugin:replacer" we can build plugin to replace tokens within a file with a given value and fully supports regular expressions.

Plugin artifactId was renamed to "replacer" from "maven-replacer-plugin" due to a naming policy change from the Maven team.

This plugin is typically used to change configuration within a project during a maven build. It also can perform some advanced text replacement functions, such as providing a separate token/value file to keep your build script concise, writing resulting text after replacement to a separate file and token matching with regular expressions. There is even support for making exact document node replacements via X-Path. 

Simple example usage:
<build>
   
<plugins>
        ...
       
<plugin>
           
<groupId>com.google.code.maven-replacer-plugin</groupId>
           
<artifactId>replacer</artifactId>
           
<version>1.5.3</version>
           
<executions>
               
<execution>
                   
<phase>prepare-package</phase>
                   
<goals>
                       
<goal>replace</goal>
                   
</goals>                  
               
</execution>
           
</executions>
           
<configuration>
               
<file>target/${project.artifactId}/somefile.txt</file>
               
<replacements>
                   
<replacement>
                       
<token>SOME TOKEN</token>
                       
<value>SOME VALUE</value>
                   
</replacement>        
               
</replacements>
           
</configuration>
       
</plugin>
   
</plugins>
</build>

I have create a sample Service Bus Project FileDebatching which will read the file in chunks from a location (will configure using JCA FileAdapter ) and writes into another location



For the Read File, I have the Physical Directory location as C:\TestFiles\ChunkFile\FileChunck\INPUT


Now, I will deploy the composite using Maven. Below are the plugin properties available in project pom.xml.

JCA File Properties in Service Bus Console after the deployment




Now using maven-replacer-plugin:replacer plugin we will replace the PhysicalDirectory location.

Go into the Project pom.xml then add the replacer plugin with the file name and token which is to be replaced.
I have fileService_file.jca file inside Resources location

















Below is pom.xml plugin details added with replacer token

<file>Resources/fileService_file.jca</file>
          <replacements>
            <replacement>
              <token>C:\\TestFiles\\ChunkFile\\FileChunck\\INPUT</token>
              <value>C:\\TestFiles\\ChunkFile\\FileChunck\\IN</value>
            </replacement>



Redeploy the Service again

Now in Service bus Console


Note: The Replacer will replace the token in fileService_file.jca file and then deploy the service, so the file is modified with the new token.


Saturday, 9 November 2013

OSB : Polling Proxy Service Fires Twice on Error

SYMPTOMS

Consider the example of a file proxy (file transport) but issue is presumably similar for all polling proxies.
Customer had a file proxy set up to poll for certain files. In the pipeline of the proxy, another proxy service is invoked to check the format of the incoming file. This is done within a transaction. If the file is good, execution completes as expected. If the file is deemed bad, an error is raised. The file proxy executes twice every time an exception is raised, causing undesirable twofold compensatory actions.

CAUSE

The polling is done by an MDB (PolledMessageListenerMDBEJB - see "File Transport Provider" under deployments) listening to a dedicated queue, which in the case of the file transport is called:
wlsb.internal.transport.task.queue.file

and lives in the JMS module called: "jmsResources".

This queue has a "Redelivery Limit" parameter (see under "Delivery Failure" tab) which is set to 1 by default .

SOLUTION

If you set this Redelivery Limit to zero, the proxy will always execute once, regardless of whether an exception is raised in the pipeline or not.

Polling proxies in OSB and Event Generators in WLI in most cases are implemented through this kind of architecture, i.e. a message with delayed delivery is put on a dedicated JMS queue. After the allotted polling interval, the message fires an MDB belonging to proxy and a new delayed delivery message is placed on the queue to fire the next polling action. Similar queues for other transports in OSB are:
wlsb.internal.transport.task.queue.email
wlsb.internal.transport.task.queue.ftp
wlsb.internal.transport.task.queue.sftp