Reason is due to premature terminating postback threads because
the serviceActivityCount is decremented erreously when updating
intermediate job statuses with portal.
Fix is in classifying job status as final or non-final.
As it is, all JobStatus in CommEngine are final; however,
derived classes may have non-final JobStatus.
Fixed by decrementing serviceActivityCount only by postJobStatus method.
Also jobs being scheduled are taken into considering when deciding
to advance broadcast state COMPLETED to ALLDONE.
Thie allows for removal of entries from the original enum JobStatus that more
appropriately belong to derivation of CommEngine. Such data complicates
the management of the original JobStateus when adding new CommEngines.
These entries can be declared in a new enums implementing
the JobStatus interface, for each derived CommEngine.
The service threads do not terminate immediately, but, instead
each service thread picks up one more job before terminating,
causing servicing more jobs which are not reported back to portal.
before progressing to COMPLETED state and issue state change
notification to portal.
Also make state change report to be a single line for ease
of grep'ing log file.
rather than periodically on schedule. This change has
no impact on user experience, and has improved logic,
and slight improvement in performance.
Also made all changes to the broadcasts structure under
synchronized control.
Broadcast state ALLDONE added to mark the event of completing postback,
and when all threads are to be terminated.
CommEngine report of a broadcast adds service times,
and number of transactions.