Murthy's blog
Polling Using JDBC BC, notify with SMTP BC
JDBC Binding Component can be used by
users who has less SQL skills. JDBC Binding Component with the help of JDBC wizard connects to the database and maps the table objects to xml,
this would also generate a JDBC wsdl with basic CRUD operations.
With the help of JDBC Binding Component user can perform
the CRUD and Poll (polling a particular table) operations.
Let's think about a business use case where user would like to notify production manager if any of the purchase order is being raised. This can be achieved easily with the help of Open ESB components (JDBC Binding Component and SMTP Binding Component, from here onwards I would refer Binding Component as BC).
One can poll (or listen to) purchase order line item table with the help of JDBC BC, once the purchase order line item is created then a mail can be sent through SMTP BC.
While polling a particular table there should be some means of
logic not to process the records which are processed once. To
figure out this JDBC BC has few ways, I am listing here couple of
them.
1. Delete from the polled table once it is processed.
2. Mark a flag column with a flag value to mark it is already processed.
We can take the help for orchestraing this business use case with the help of BPEL. JDBC BC when finds a record on purchase order line item table, will process the record. Then SMTP BC would send a notification through mail to the production manager. (http://blogs.sun.com/vishblogs/entry/using_smtp_bc_to_send blog by Vishnu Vardhan regarding SMTP BC)
The configuration details can be configured in the bindings section of the WSDL, see below...
Please find the sample projects
1. Bpel Project
http://blogs.sun.com/narayana/resource/SamplePollBpel.zip
2. Composite Application Project
http://blogs.sun.com/narayana/resource/SamplePollJBI.zip
3. Table structure grab (to create the table used here go to netbeans runtime tab, under that databases node, after connecting to the default sample database select Recreate table and point to the below ".grab" file)
http://blogs.sun.com/narayana/resource/PO_LINE_ITEM.zip
Posted at 03:12PM Mar 30, 2007 by pedapudinarayana in Sun | Comments[0]
Friday Mar 30, 2007