lundi 23 octobre 2017

JAVA obtain ResultSet from DB, segregate them in different files, send these files to different email ID's

I am struggling with one problem. The problem statement is to start Multiple Threads simultaneously. Every thread responsibility is to fetch records from DB. every records will have groupID. meaning if we get 100000 records with 10 distinct GroupID's... 10 files will be created with respective number of records in every file. Now we need to send all these 10 files to 10 different sources.

How to configure the same in Springs..? Which design pattern should be used.? if you have any example please let me know.

I am using properties file to provide SQL statements, which will return Result set and then to store them in temporary files. These files i send via email. but i am unable to segregate via groupID's and different mails.

Aucun commentaire:

Enregistrer un commentaire