Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18950

New Batch Artifact wizard




      There are about 20 artifacts in Java EE Batch:
      Batchlet; Checkpoint Algorithm; Decider; Item Reader; Item Writer; Item Processor; Partition Analyzer; Partition Reducer; Partition Collector; Partition Mapper; Partition Plan; Chunk Listener; Item Process Listener; Item Reader Listener; Item Writer Listener; Job Listener; Step Listener; Retry Process Listener; Retry Read Listener; Retry Write Listener; Skip Process Listener; Skip Listener; Skip Write Listener.

      We may have one wizard for each, or some of this artifacts. However, there is so much common in them that it makes sense also (or instead) to have one wizard with list choice of artifact. When a specific artifact should be created from the context of Batch XML editor, this wizard can be invoked with selection of that artifact (list of artifacts may be disabled or hidden).

      1. Artifact implements a specific Java interface (for interfaces that have more than 1 method, there is optional abstract class to extend that implements rarely overridden methods);

      2. Reference name should be provided for each artifact. There are 3 options:

      • An implementation of Batch runtime may define its own way of matching class to name. For example, CDI uses javax.inject.Named;
      • META-INF/batch.xml
      • by default, when first 2 options failed reference name is tried as the qualified class name.

      3. Artifact class may declare fields, with values to be injected from properties set in job xml element referencing that artifact:

          @Inject @BatchProperty(name="property1")  String property;
          @Inject @BatchProperty String property2;

      Thus, the wizard will have inputs as follows:

      • Source folder: [as in New Java Class wizard]
      • Package: [as in New Java Class wizard]
      • Name: [text]
      • Artifact: [combo]
      • [radio] implement interface [radio] extend abstract class (if class is not available, the option is disabled)
      • Reference name: (block of inputs)
      • Artifact loader: [radio] @Named [radio] batch.xml [radio] Class loader
      • Artifact name: [text] (for first 2 options filled with default value; for the last option disabled)
      • Properties: [list editor with 'Add' and 'Remove' buttons]

      Some more inputs may be inherited from New Java Class wizard, if default values are not enough.


        1. artifact.png
          61 kB
        2. BatchArtifact.png
          0.3 kB
        3. BatchArtifactWizBan.png
          2 kB

          Issue Links



              scabanovich Viacheslav Kabanovich (Inactive)
              scabanovich Viacheslav Kabanovich (Inactive)
              0 Vote for this issue
              2 Start watching this issue