How to configure flat file adapter to retrieve records from where it left when server crashes.
Please let me know what parameter or property to modify so that flat file adapter will pick the correct records when strated again after server crash.
lets say one flat file contains 500 records in it. If flat file adapter has read 200 records and processed it, after that there was process server crash. When server restarts again, adapter should pick up the 201st record in the file.
But now it is processing it all over again from 1st record.
thanks in advance.
This topic has been locked.
7 replies Latest Post - 2010-04-12T11:44:52Z by vijapur
Pinned topic how to configure flat file adapter to retrieve the records
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-04-12T11:44:52Z at 2010-04-12T11:44:52Z by vijapur
Re: how to configure flat file adapter to retrieve the records2010-04-06T05:11:05Z in response to vijapurHi,
The standard way for a Flat File resource adapter to deal with event files having multiple business objects (BOs) is to store the individual BOs as events in the event table with a unique event id.
This event id is of the following format:
where N is the total number of BOs in the event file and M is the current position of the BO in the event file.
The adapter internally maintains a list of all the BOs within an event file including the status for each BO. The status of the BO can be either passed or failed. Once the status for each of the BOs is updated, all BOs for that event file are assumed to be processed, and the adapter archives the event file. Entries for all successfully processed BOs are deleted from the event table. However, failed entries are retained in the event table for reference.
Once the server crash happens and the Flat File adapter is restarted, Flat File adapter will work in the recovery mode as below:-
If the adapter is restarted while it is processing the BOs, it follows a recovery path that checks for all the processed (either passed or failed) and unprocessed BOs (status 0) before the adapter was restarted. It gets the list of processed and unprocessed BOs based on the file name specified in the event id. Thus the adapter now has a list of all the successfully and unsuccessfully processed BOs as well as the list of unprocessed BOs.
Re: how to configure flat file adapter to retrieve the records2010-04-06T11:21:55Z in response to anket1234Hi,
Further to add to my earlier reply :-
To ensure that there will be no duplicate delivery of events, kindly enable event persistence.
Event persistence will ensure assured once delivery.
Re: how to configure flat file adapter to retrieve the records2010-04-06T12:09:14Z in response to vijapurThanks Anket for your replys,
Please can you tell me which property i need to set for enabling event persistant.
the following are the custom property set on activation spec in my local admin console. I have attached screenshot of AS custom property.
Re: how to configure flat file adapter to retrieve the records2010-04-08T11:00:18Z in response to vijapurHi,
To Enable the event persistence for Flat File Adapter to achieve the assured once delivery perform the following steps:-
1.) Create the Data Source on the Server with the specific JNDI name.
2.) Then specify the following activation specification properties for Flat File Adapter-
Re: how to configure flat file adapter to retrieve the records2010-04-08T22:28:29Z in response to vijapurHi,
Thank you for your reply, now I have created Database on local machine using derby embedded driver
Then I have created datasource on admin console and I try to do test connection getting the following error,
"The test connection operation failed for data source EventPersistantDB on server server1 at node widNode with the following exception: java.sql.SQLException: Database 'EventPersistantDB' not found.DSRA0010E: SQL State = XJ004, Error Code = 40,000. View JVM logs for further details."
As a result i am not able to test persistant functionality of adapter.
Re: how to configure flat file adapter to retrieve the records2010-04-09T02:52:27Z in response to vijapurHi,
It may be the fact that your Data source is not created properly and the test connection is not getting successfull.
Check if the datasource you have created have all the required artifacts given as required by DERBY.
Also check for the credentials that you will provide to connect to the DB. Check the SQL files location are properly given under the datasource.
Here are few URL which where user had got similar sorts of problems:-
Re: how to configure flat file adapter to retrieve the records2010-04-12T11:44:52Z in response to vijapurThanks Anket,
I am able to configure the database and test for persistant events.
I have configured the Databaase in Derbyby running as Network server mode and able to create database and test the module. Really appreciate your help thanks.