Thursday, October 17, 2013

DB Adapter Polling using Sequencing File - SOA 11G

I will be explaining today steps to create a polling DB adapter based on sequencing file.Most commonly used After Read "Logical Delete" strategy, I have explained already in one of my previous posts.So, I will just explain configuration required for sequencing file polling DB adapter. Remaining configuration, how to configure DB adapter , please refer to my post on DB adapter tutorial.

Step1: Open up your DB adapter wizard and select "Poll for new records or changed records" in the operatrion tab and in step 8 of After Read screen, select Update a Sequencing File.

Step2: Click next. In next window that pops up, select the sequencing file by passing the complete physical path.I have created a sequencing file on my server only under my servers logs directory.In sequence ID field, select the field from table which will act as sequence ID and on basis of which DB adapter will poll for new records.In my case I have selected Transacion ID.Complete the all steps and design your BPEL process.
Step3: Now If you look at my table structure, there are two columns Transaction Id and Notes.Our DB will poll on Transaction ID. Let me explain you, how this sequencign file concept works.
You have to create one sequencing file and in that file you will enter value of only that field which will always be incremented in ascending order in the table when new records are being inserted. Lets say in table we have 3 records with transaction ID as 1,2 and 3. In my sequencing file I will enter 1 and save it.Now Our DB poller will poll for all records with transaction ID greater than 1(current value in sequencing file) and value in the sequencing will automatically will be changed to 3. Next time new records inserted with trabsactiond ID greater than 3, all those records will be polled and so on.

Step4: I have created one sequencing file with transacion ID value as 4304.Please note only sequence ID(transaction  ID in our case) value should be there in file, nothing else.
Step5: In my table I have 3 records that have transaction ID greater than 4304. All those records will be polled. Verify the same on EM under instances Tab.
Step6: Also verify your sequencing file to reflect the updated value of transaction ID as 4393.
In this way DB poller based on sequencing file works.
Hope this post is helpful to you.

Happy Learning,
Cheers,
Karan



Friday, October 11, 2013

Unable to Edit Database/File Adapter in JDev - SOA 11G

Hi All,

There is one issue that lots of people faces while importing an existing SOA project into JDeveloper.For instance, you have a composite that is polling records from DB and writing it into some file. After importing when you try to edit DB or File adapter by double clicking the wizard simply wont open up. Strange isnt it.
Even if you reimport the same project it will still not open.What could be the issue here.

The simple solution or workaround you can say is add the below line in your respective WSDL file of File or DB or JMS adapter(any JCA adapter):
<?binding.jca readFile_file.jca?>

 

where readFile_file.jca is the jca file name of your file adapter. In case of DB Adapters, it would be filename_db.jca and in case of JMS adapter would be filename_jms.jca and hence so on for all other JCA adapters.



Save your WSDL file close it and now double click on your adapter. Bingo its opening now :) Nice isn'it.

Hope this post will help many of you frustrated facing such type of issues.

Happy Learning...

Cheers,
Karan