Thursday, October 24, 2013

Mediator Vs Oracle Service Bus (OSB) in Oracle SOA Suite


In this post i am going to clear the basic difference between Mediator and Oracle Service bus. There is always some confusion between these two for new comers. Both of these components can be used for mediation purpose.

 Both mediator and Oracle Service bus can perform Interface and data mapping, filtering and routing etc but the scope of both these components are different. For Intra-composite mediation


i.e connection of components within a give composite we use Mediator Component while for Inter-composite mediation we use Oracle service bus i.e to connect different composites. While doing this OSB can also perform other basic tasks like , Protocol translation service pooling etc.

 To check out the usage of Mediator you can check this post
Mediator in Oracle SOA Suite

Monday, October 7, 2013

IO Error: Connection reset by peer: socket write error, Connection Closed SQL Developer

From couple of days i was facing IO Error: Connection reset by peer: socket write error, Connection Closed  in my SQL Developer. I connected with Remote server DB. After wasting much of time i got the solution, Now i am sharing it, if it could save time of who is facing this issue. I hope it would resolve the issue. 

The problem was due to Proxy, I was using Proxy for internet access but i did not used this proxy in SQL Developer. You should give proxy and must restart  your SQL Developer if you are using Proxy. 

To set Proxy go to Tools->Preferences->Web Browser and Proxy and set your Proxy there. In host name give your Proxy, in Port give port might be 8080 and in exception give any remote IP on which you facing this issue, Now restart your SQL Developer and try again, Problem will be no more.
Are you still getting problem? then try this solution too. 
SQLDeveloper is not connecting to remote database

Sunday, October 6, 2013

Calling BPEL Process using Database Adapter, Automatically Invoking BPEL Process

In this post i will show how we can call BPEL Process using DB Adapter. This post is a second part of my Previous post http://technasir.blogspot.com/2013/10/polling-in-oracle-soa-database-adapter.html . I will continue from previous post. I suppose you have created DB Adapter as i did in my previous post. Your requirement could be different, but scenario could match.

1) After creating DB Adapter your composite will look like this which also have BPEL Process that you want to invoke using this DB Adapter
2) Connect this DB to Your BPEL as shown below
3) Save your composite and open your .bpel name file. Delete any old Partner link, keep your newly created Adapter as shown in below snap
4) Now connect your DB Adapter that will invoke BPEL Process to receiveInput activity and a popup will appear, create a variable and click apply and then ok
5) Your BPEL file will look like below
6) Now go back to your Composite.xml file and delete old service it will be no wired now
7) Now save your Project and Build it. You might get an error like what i got. do not worry just double click on the error and select variable that is causing this error just delete those lines as shown below

8) Now rebuild and deploy it. Should be no error this time

Now every time when any changes would happen in your polling table, your DB Adapter will invoke this BPEL Process.

Polling in Oracle SOA Database Adapter


A very useful feature of Oracle data base adapter is polling. It tell us about any changes in particular table on which we want to poll. Using this feature we can do lot of things according to our logic and our requirement. I will split this post in two part

1) How to Configure DB Adapter for Polling
2) How to Invoke BPEL Process using DB Adapter, or Automatically

Steps to configure polling in SOA DB Adapter

1) Drag and Drop a Database Adapter in Exposed services, left side, on Service name window give Service Name
2) Create a Connection to your DB and give JNDI name that you have set in your Weblogic
3) In Select Operation Type window select "Poll for new or changed records in a table"
4) In Next Window Import tables and select table on which you want polling
5) In next Window check Primary key for detail see below snap
6) Click next and you will reach on attribute filtering window. check if you want any other attribute. i only have one. Read detail for more info
 7) Click next and choose what you want after reading, i am writing on file, that are present on my server
8) Click next you have to give location of your file
9) On next screen set your polling frequency and i set 10
10) Click next, next and finish it on Finish window your Adapter now configured

In next tutorial i will show how you could invoked BPEL Process using this DB adapter
Here is the link of next Part 
http://technasir.blogspot.com/2013/10/calling-bpel-process-using-database.html 

Saturday, October 5, 2013

Create Sequence in SQL Oracle, Create Trigger on Insert and Update in Oracle

Sequence in Oracle SQL. Following is the basic code to create a sequence in Oracle SQL

CREATE SEQUENCE sequence_name
START WITH 1
INCREMENT BY 1
MAXVALUE 99999999
MINVALUE 1
NOCYCLE;

Trigger on insert and update on any table 

Following code can be used to create a trigger on any table, It will invoke and do what you want when any value will get inserted and update in table

create or replace trigger trigger_name before insert OR update on table
for each row begin

write you logic here what should happen when trigger gets invoke.
end;

Friday, October 4, 2013

Mater Detail Relationship In DB Adapter BPEL. 1 to M Relationship

In this post i will show how to create a Parent child relationship in Database Adapter. Create a new SOA Application in your JDeveloper with Empty Composite. Now follow these steps to configure a DB Adapter by using Parent child relationship

1) Drag and Drop a DB Adapter in External References and give its name.

2) Click next and create a DB Connection and set your JNDI name according to your Weblogic server configured JNDI name for this DB

3) Click next. Operation Types screen will appear now i want to insert data, however your purpose can be different, just choose according to your requirement
4) On next screen click on Import table and choose your master and detail table from pop up and then click ok
5) In next two steps or depend on number of tables you selected, Choose primary keys for your tables, just primary keys not the primary foreign keys.
6) for second table, i only have two table
7) Now click next, Relationship window will open, click on create to create a relationship a popup will appear and select things according to your choices. Below is my case
8) Click next, Here you can see relationship of tables
9) Click next and choose columns which you want to select.
 10) Click next and choose defaults on next screens and click finish at the END that it.

Thursday, October 3, 2013

Oracle SOA Suite 11g Installation, Maintenance, Purging, Performance tuning, troubleshooting and Administration


I found very useful guide from Oracle which covers Oracle Fusion Middleware, Specially About Oracle SOA Server. It covers everything that we should know about Oracle SOA suite. Following are some main points of this document. 

1) Installation of Oracle SOA Suite and Schema's 
2) Upgrade of Oracle SOA Suite  
3) Administration of Oracle SOA Suite
4) Performance tuning of Oracle SOA Suite
5) Purging techniques in Oracle SOA, Fusion Middleware, Step by Step Purging guide
6) Troubleshooting of Oracle SOA Infrastructure 

Document name is 
Oracle Fusion Middleware (FMW) SOA 11g Infrastructure Database: Installation, Maintenance and Administration Guide
Doc ID is : 1384379.1

You can find it on https://support.oracle.com.