Author |
Message
|
6thelement |
Posted: Mon Feb 23, 2015 4:57 am Post subject: DB Input Node Usage Issue |
|
|
Apprentice
Joined: 07 Nov 2008 Posts: 30
|
Hello,
Here is the design problem I am trying to solve, my understanding on it and would need your insight on this.
1. Data gets inserted into DB application tables which triggers an event in event table. - DB trigger would do the work.
2. WMB polling on event table and gets notified about the event. - DB input node is the choice here. Read Event as a separate transaction.
3. WMB intercepts the event, extracts the information and calls the application table through a stored procedure/view - DB Input node(Build Message) would do this work. May be one additional compute node to do these steps from Build Message.
4. WMB receives the resultset, transforms the request to CSV format and puts it into a queue. - DB Input node(Build Message) would do this work. May be the same additional compute node of above point to do these steps from Build Message.
5. WMB needs to move the event from event table to an archive table through a stored procedure/view - May be calling from End Event?
WMB is on an AIX machine and ODBC file is updated with DSN connections to the Oracle DB.
Couple of more queries.
1. Why does the DB input node pallet is asking for a Database definition and its bit confusing on what JDBC driver to choose.
2. The complete infrastructure is running on a Load Balancing environment and so there is a chance that the same events can be picked up by different DB input nodes. Is there anyway we can do some record locking through ESQL where the events will not be processed by any other instance unless the lock is released by End Event. I understand that Read Event runs on a separate transaction then Build Message/End Event.
Is the problem sound familiar and is DB input node best way to handle in IIB? |
|
Back to top |
|
 |
nelson |
Posted: Mon Feb 23, 2015 5:39 am Post subject: Re: DB Input Node Usage Issue |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
After continue, I strongly recommend you to study the Database Input Node sample, specially take a look carefully at the the Database Input Node source code tab (the ESQL). It will help you understand how the node works and give you some answers.
6thelement wrote: |
1. Why does the DB input node pallet is asking for a Database definition and its bit confusing on what JDBC driver to choose.
|
At development time you need to use a JDBC connection if you want the wizard to "fill" the combo boxes to generate the DBInput Node code for you.
Hope that helps. |
|
Back to top |
|
 |
6thelement |
Posted: Mon Feb 23, 2015 5:50 am Post subject: |
|
|
Apprentice
Joined: 07 Nov 2008 Posts: 30
|
Thanks. Have gone through the sample. It doesnt give me the clarity required to design my problem statement. What is the bare minimum setting that I need to do through the DB event design tab? If I dont want DB input node to generate the code, then what setting do you think would work? |
|
Back to top |
|
 |
nelson |
Posted: Mon Feb 23, 2015 6:16 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
6thelement wrote: |
What is the bare minimum setting that I need to do through the DB event design tab? |
I should refer to the KC: http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc34044_.htm
6thelement wrote: |
If I dont want DB input node to generate the code, then what setting do you think would work? |
You will need to write the code for ReadEvents, BuildMessage, EndEvent and HandleDatabaseError procedures yourself. The logic behind this is very simple: query the event table, query the application table, build the output message and do some work to the event table to mark (or delete) the processed events.
Please read carefully the comments included within the source code. |
|
Back to top |
|
 |
6thelement |
Posted: Mon Feb 23, 2015 6:30 am Post subject: |
|
|
Apprentice
Joined: 07 Nov 2008 Posts: 30
|
Hello Nelson,
Thanks for your reply. I have read carefully the complete documentation on Infocenter as well as code in the samples. Am I missing something?
As a first step, when I get the new DB input node - it is asking for new DB definition. Is it mandatory? Can I skip setting up this complete screen? |
|
Back to top |
|
 |
nelson |
Posted: Mon Feb 23, 2015 8:17 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
6thelement wrote: |
Hello Nelson,
Thanks for your reply. I have read carefully the complete documentation on Infocenter as well as code in the samples. Am I missing something?
As a first step, when I get the new DB input node - it is asking for new DB definition. Is it mandatory? Can I skip setting up this complete screen? |
At the end of the "Database Event Design" tab you will see a generate query option. To enable this option you have to fill all the required fields. To fill all the required fields (combo boxes) you need a database definition. Create a database definition and then reopen the wizard. You will see the combo boxes populated and the "generate query" option enabled for the toolkit to do the job for you.
On the other hand, as I said before, you can skip the previous steps and go directly into the "source" tab and write the code yourself. |
|
Back to top |
|
 |
6thelement |
Posted: Tue Feb 24, 2015 2:40 am Post subject: |
|
|
Apprentice
Joined: 07 Nov 2008 Posts: 30
|
Makes sense now.
How about the issue of handling the DB input node picking up the same message for processing in a HA environment. |
|
Back to top |
|
 |
nelson |
Posted: Tue Feb 24, 2015 4:56 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
6thelement wrote: |
Makes sense now.
How about the issue of handling the DB input node picking up the same message for processing in a HA environment. |
Take a look at this discussion. |
|
Back to top |
|
 |
|