The user uploads the file of data into the system via an entry screen and I have been looking at ways of running a background command to do the web service upload, so the screen doesn't block.
I tried the recommended AddJobCmd approach as per the Info Center documentation, but because the command will run for an hour or so, I get the warnings in the log suggesting that the thread might be hung.
I looked at setting using a work manager (starting with default) and setting...
...and adding an applicationType tag to wc-server.xml...
<component compClassName= "com.ibm.commerce.scheduler.SchedulerComm" enable= "true" name= "Scheduler"> <property autoClean= "off" broadcastExpireTime= "1800" contextSetName= "Authoring" cycleTime= "600" display= "false"/> <applicationType applicationName= "default" maxNumofThreads= "10"/> </component>
...before firing off the command, but couldn't work out why it still gave the warnings every 10 minutes or so as the default WorkManager 'Work timeout' value was 0, which I presumed meant infinite.
There doesn't seem to be much documentation on how to write a very long running command, so I'm having to resort to dividing the work up and adding jobs for each section. Not ideal as it makes the logic more complex than just running a single command for the duration.
Does anyone have a good approach to solving this problem?