Menu

Thread safeness of JRecord library

vimesh
2014-06-26
2014-06-28
  • vimesh

    vimesh - 2014-06-26

    Hi Bruce,
    I would like to know the possibility of accessing JRecord concurrently. So was it designed to use in a thread safe manner.

    Thanks
    Vimesh

     
  • Bruce Martin

    Bruce Martin - 2014-06-26

    JRecord was not specifically designed to be thread safe.

    There are section that will be thread safe (or nearly so). For records / lines you can use your own records / lines using a provider (or builder class).

    What exactly is your planned use ???

     
  • vimesh

    vimesh - 2014-06-27

    Hi Bruce,
    The requirement is to read a set of vendor files(copy book formatted data files) concurrently and create xml or java objects using the data in them.
    I am currently using the ioProvider.getLineReader() method to read the records, however when multithreads access this method, I get an error which is "The file "parser.dat" is either missing or corrupted"

    Thanks
    Vimesh

     
  • Bruce Martin

    Bruce Martin - 2014-06-27

    Problem is occurring in the initial parsing of the Cobol Copybook. This only happens once. I will put a synchronize around the relavent sections of code

     

Log in to post a comment.