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.
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.
Re: how to configure flat file adapter to retrieve the records2010-04-06T05:11:05ZThis is the accepted answer. This is the accepted answer.Hi,
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:55ZThis is the accepted answer. This is the accepted answer.
Re: how to configure flat file adapter to retrieve the records2010-04-06T12:09:14ZThis is the accepted answer. This is the accepted answer.Thanks 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:18ZThis is the accepted answer. This is the accepted answer.
- vijapur 060001G16S
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:29ZThis is the accepted answer. This is the accepted answer.Hi,
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:27ZThis is the accepted answer. This is the accepted answer.
- vijapur 060001G16S
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:52ZThis is the accepted answer. This is the accepted answer.Thanks 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.