I have always coded web applications using
jsp's and depending what is selected from the web page then methods in
java classes are called and processed, but always returning to the jsp.
Now, I want to write a java program that simply reads a table, selecting off certain records, using data from these records to populate fields in output records and write the formatted output records to a flat file.
After all records are processed I need to hand off the flat file using NDM which will transmit the file to a server where another application will process these records.
A cron job will automatically run daily which will kick off my process. Will this cron job execute my stand alone java program containing a main method?
My processing consists of reading one record from table, performing a few calculations using data from record, populating the output record and writing this record to a flat file.
Should I include the connection and table processing in this same class or call a method in a separate class that performs the table stuff?