Announcement Announcement Module
Collapse
No announcement yet.
Flat File encryption with Spring Batch Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flat File encryption with Spring Batch

    Hi,

    I need to encrypt medium/large flat files using PGP.

    Can I get best result do encryption with Spring Batch?

    How to accomplish this? What should I do? Please Guide me.

    Thanks in advance.

  • #2
    Can someone give me an idea(s) to do this?

    Comment


    • #3
      I don't think Spring Batch really has much to say about it specifically. You need to transform your business data, so you need to plug that into one of the Batch strategies (ItemProcessor, ItemWriter, Tasklet are the obvious places to start).

      Comment


      • #4
        Thank you for your replay.

        The following way I am going to achieve.

        Batch Configuration:
        ------------
        <step id="enctyptFile">
        <tasklet>
        <chunk reader="businessObjectReader"
        writer="flatfileWriter"
        commit-interval="100"/>
        <listeners>
        <listener ref="fileEncryptStepListener"/>
        </listeners>
        </tasklet>
        </step>

        Note: Here, Generating flat file based on the DB data. After that encrypting the generated flat file
        -------------
        bouncycastle-pgp java api for encryption.

        Please Let us know any other better approach(s) to encryption the file.

        Comment


        • #5
          The approach seems reasonable, the only question is how you want to handle failure. If the encryption fails, what would you do? Furthermore, if the step fails halfway through, do you delete the half written file? I think how you answer that determines whether or not the encryption should be as a separate step, or as a StepListener, as you have implemented.

          Comment

          Working...
          X