Topic
7 replies Latest Post - ‏2010-04-12T11:44:52Z by vijapur
vijapur
vijapur
13 Posts
ACCEPTED ANSWER

Pinned topic how to configure flat file adapter to retrieve the records

‏2010-04-05T08:46:24Z |
Hi,
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.
Prakash
Updated on 2010-04-12T11:44:52Z at 2010-04-12T11:44:52Z by vijapur
  • anket1234
    anket1234
    5 Posts
    ACCEPTED ANSWER

    Re: how to configure flat file adapter to retrieve the records

    ‏2010-04-06T05:11:05Z  in response to vijapur
    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:
    <eventFileName>_<lastModifiedTimestamp>_M_of_N,
    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.

    Thanks
    Anket
    • anket1234
      anket1234
      5 Posts
      ACCEPTED ANSWER

      Re: how to configure flat file adapter to retrieve the records

      ‏2010-04-06T11:21:55Z  in response to anket1234
      Hi,

      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.

      Thanks
      Anket
  • vijapur
    vijapur
    13 Posts
    ACCEPTED ANSWER

    Re: how to configure flat file adapter to retrieve the records

    ‏2010-04-06T12:09:14Z  in response to vijapur
    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.

    thanks
    Prakash
    • anket1234
      anket1234
      5 Posts
      ACCEPTED ANSWER

      Re: how to configure flat file adapter to retrieve the records

      ‏2010-04-08T11:00:18Z  in response to vijapur
      Hi,

      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-
      EP_UserName
      EP_TableName
      EP_DataSource_JNDIName
      EP_Password
  • vijapur
    vijapur
    13 Posts
    ACCEPTED ANSWER

    Re: how to configure flat file adapter to retrieve the records

    ‏2010-04-08T22:28:29Z  in response to vijapur
    Hi,

    Thank you for your reply, now I have created Database on local machine using derby embedded driver jdbc/EventPersistantDB.
    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.
    • anket1234
      anket1234
      5 Posts
      ACCEPTED ANSWER

      Re: how to configure flat file adapter to retrieve the records

      ‏2010-04-09T02:52:27Z  in response to vijapur
      Hi,

      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:-

      http://www-01.ibm.com/support/docview.wss?uid=swg21235608

      http://fixunix.com/websphere/213471-wps6-cloudscape-database-wpsdb-not-found-dsra0010e-etat-sql-xj004-code-derreur-40-000-a.html
  • vijapur
    vijapur
    13 Posts
    ACCEPTED ANSWER

    Re: how to configure flat file adapter to retrieve the records

    ‏2010-04-12T11:44:52Z  in response to vijapur
    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.

    with regards
    Prakash