Post on 22-Jan-2018
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 1/23
My Tech BlogJava Web Service SOA
HomeMy LearningsJavaXStreamESBBPELWebservicesHibernateSQLJ2EE
Type text to search here... Home > Adapter > Oracle 11G Database Adapter as Poller with BPEL process
Oracle 11G Database Adapter as Poller with BPELprocess
December 16, 2012 sabapathy Leave a comment Go to comments
Oracle Database Adapter works with Oracle BPEL Process and Oracle Mediator.This Database adapter enable the BPEL and mediator to communicate with OracleDatabase or other third party databases with JDBC.
In this post will see how to use the database adapter as a poller with BPEL process.In this example one external service inserts records into database table. This Databaseadapter polls the records from the table and push it to BPEL process.There is a column “Status” in the table. Initially it will be inserted with status “Ready”.Once it is picked it will be updated to status “Processing”.It will be updated to status “Completed” once the record has been successfully processed.
table structure and sample values
123456789
1011121314
15
CREATE TABLE CREATE TABLE SUB_CONNECT( IDENTIFIER VARCHAR2(50) PRIMARY REQUEST_XML CLOB NOT NULL, CREATED_AT TIMESTAMP NOT NULL, UPDATED_AT TIMESTAMP NOT NULL, STATUS VARCHAR2(20) NOT NULL ); CREATE SEQUENCE TO CREATE UNIQUE IDENTIFIER COLUMNCREATE SEQUENCE SB_CONN_SEQ START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; INSERT SAMPLE VALUESINSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,
INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 2/23
Create DB Adapter to poll record with status “Ready”1.Create SOA Application2.Create SOA Project with Empty Composite.
15161718192021222324252627282930313233
INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL,INSERT INTO SUB_CONNECT VALUES('IDENTIFIER'||SB_CONN_SEQ.NEXTVAL, SELECT TABLE SUB_CONNECTSELECT * FROM SUB_CONNECT;
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 3/23
EmptyComposite
3. Create the Database Adapter3.1. Right click on Exposed Services left side panel and select Database Adapter. It willprompt the Database Adapter creation window.
SelectDatabaseAdapter
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 4/23
DBConfigWizad
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 5/23
DBAdapter3
3.2. Create Database Connection
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 6/23
CreateDBConnection
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 7/23
CreateDBConnJNDI
3.3. Select Operation Type The Database Adapter will be processed by two threads.1. One thread will poll the record from the table and push it to BPEL process“receiveInput” point.2. Next thread will carry out the BPEL Process.
This entire Database Adapter and BPEL Process will be handled by single thread ifDo Synchronous Post to BPEL(Allows InOrder Delivery) option has been selected.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 8/23
OperationType
3.4. Then Import table where the poller should point and Click Next.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 9/23
ImportTable
Follow
Follow “My TechBlog”Get every new post deliveredto your Inbox.
Enter your email address
Sign me up
Build a website with WordPress.com
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 10/23
DBAdapter8
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 11/23
Relationships
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 12/23
Attributes
3.5. Select After Read polling strategies. Update a Field in the SUB_CONNECT table (Logical Delete). This will read the Datafrom the table with status value is “Ready”.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 13/23
AfterReadPollingStrategy
Logical Delete Field : Column Name on Table , based on this column value (“Ready”)the poller will pick the record.Read Value : The value to indicate that the row has been read . (“Processing”)Unread Value : (Optional) Enter an explicit value to indicate that the row does not need tobe read. During polling, this row is skipped. . (“Completed”)Reserved Value:Reserved Value : This value is to indicate that the row is reserved. Blocked
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 14/23
LogicalDelete
3.6. Polling Options. Polling Frequency: Select how frequently to poll for new records or events.Database Rows per Transaction: Number of record has to be polled per bpel instance.Order By: Poller will picks the records based on the “Updated_At” time value.Distributed Polling: This option has to be enabled when this Database Adapter isdeployed in multiple soa managed servers.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 15/23
PollingOptions
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 16/23
SelectionCriteria
3.7. Retry Options. Default retry option is available in Database Adapter.Use to specify the value for autoretry incase of timeout. In case of a connection related fault the invoke can beautomatically retried a limited number of times.Example:
AttemptsSpecify the number of times to acquire a new SQL connection and retry the invoke.
Interval (s)Specify the time interval between each retry.
Backoff Factor: xAllows you to wait for increasing periods of time between retries. 9 attempts with astarting interval of 1 and a back off of 2 will lead to retries after 1, 2, 4, 8, 16, 32, 64, 128,and 256 (28) seconds.
Max Interval (s):Specify the maximum interval for retries.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 17/23
RetryOptions
DBAdapterConfigEnd
4. Composite with Database Adapter
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 18/23
CompositeWithDBAdapter
4.1Right Click on “Components” screen and select “BPEL Process”.
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 19/23
SelectBPEL
4.2 Name the BPEL component,namespace, select Template and select input ,output fromXSD created while DB Adapter creation.
NameBPELandSelectInput
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 20/23
SelectedInput
Categories: Adapter Tags: DB Adapter 11G, DBAdapter, SOA 11G, SOA 11G DBAdapterComments (0) Trackbacks (0) Leave a comment Trackback
1. No comments yet.
1. No trackbacks yet.
Leave a Reply
Related
Integrating BPEL and BAMin Oracle SOA11G usingSensors
Oracle SOA 11G lookupXRef1M function
FlowN activity in BPEL SOA11G
In "BAM"In "BPEL" In "BPEL"
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 21/23
Updating the EJB Transaction Timeout Value in the Deployment Archive After SOAInfrastructure Failure SOA11G – Fault Handling using Custom Java ClassRSS feed
Categories
ANT (7)Eclipse (1)
Decompiler (1)General (1)Hibernate (5)J2EE (5)
EJB3 (1)JDBC (1)Servlet & JSP (3)
Java (8)sql (2)XStream (1)
JAXB (1)Oracle (2)Restful (1)SOA (36)
Adapter (1)BAM (4)BPEL (12)DVM (2)Exceptions_and_Solutions (3)Installation (2)
RCU (1)JDeveloper (1)MDS (3)Mediator (1)OSB (5)WLST (1)
Weblogic (1)webservice (5)XSLT (5)
Stats
Enter your comment here...
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 22/23
My Calendar
December 2012M T W T F S S
« Nov Jan »
1 23 4 5 6 7 8 910 11 12 13 14 15 1617 18 19 20 21 22 2324 25 26 27 28 29 3031
Archieves
Select Month
Meta
RegisterLog inEntries RSSComments RSSCreate a free website or blog atWordPress.com.
Recent Posts
OSB11G Dynamic Routing SampleOSB11G calling RESTful Web ServiceExampleOSB11G Java Callout ExampleOSB11G – Sample With Assign,Replace, Insert, ServiceCallOut, Logand XQueryOSB11G_SayHello Sample ( WSDLBased )
Pages
BPELESB
12/14/2015 Oracle 11G Database Adapter as Poller with BPEL process | My Tech Blog
https://rathinasaba.wordpress.com/2012/12/16/oracle11gdatabaseadapteraspollerwithbpelprocess/ 23/23
HibernateJ2EEJavaMy LearningsSQLWebservicesXStream
TopCreate a free website or blog at WordPress.com. The INove Theme.