View Poll Results: Interface name for business logic implementation?

Voters
21. You may not vote on this poll
  • Module

    0 0%
  • UnitOfWork

    3 14.29%
  • WorkUnit

    2 9.52%
  • LogicalUnitOfWork

    1 4.76%
  • Action

    1 4.76%
  • Executable

    2 9.52%
  • BusinessOperation

    3 14.29%
  • BusinessTask

    13 61.90%
Multiple Choice Poll.
Results 1 to 10 of 22

Thread: What class name should we use for the unit of work?

Threaded View

  1. #1
    Join Date
    Jun 2005
    Posts
    4,241

    Default What class name should we use for the unit of work?

    There is a central concept in Spring Batch (in all batch processing) of the unit of work. Usually an item is read from an input source and processed. The item might be a message, line from a file, record from a database table, etc. The combination of the input and output is common, and there are also jobs which combine the two into a single operation. Transaction boundaries are usually set at the level of several of these units of work (a "batch", or a "chunk"). The interface is pretty much fixed:

    Code:
    public boolean execute();
    implementations return false to inform the framework that there is no more processing to be done (data are exhausted).

    Some pros and cons: "unit of work" has definite connotations of a transaction (which we are only a part of). "Module" is the name used at the moment, but it is a) bland, b) clashes with other uses, principally in OSGi. So we hate it, but it's on the list in case anyone actually disagrees.
    Last edited by Dave Syer; Jun 28th, 2007 at 08:52 AM. Reason: Added interface

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •