[
https://issues.jboss.org/browse/JBIDE-18950?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich edited comment on JBIDE-18950 at 12/13/14 12:57 AM:
--------------------------------------------------------------------------
Use of javax.inject.Named should be clarified.
javax-inject API does not imply CDI. Any other Batch runtime implementation can use it to
set artefact's reference name. Batch API uses javax.inject.Inject and
javax.inject.Qualifier so that it is most natural to assume when finding an artefact
annotated with javax.inject.Named that the annotation is used to define the reference
name.
There are no other relations between Batch and CDI, so that our Batch tools can be CDI
unaware while being smart with javax.inject.Named.
was (Author: scabanovich):
Use of javax.inject.Named should be clarified.
javax-inject API does not require CDI. Any other Batch runtime implementation can use it
to set artefact's reference name. Batch API uses javax.inject.Inject and
javax.inject.Qualifier so that it is most natural to assume when finding an artefact
annotated with javax.inject.Named that the annotation is used to define the reference
name.
There are no other relations between Batch and CDI, so that our Batch tools can be CDI
unaware while being smart with javax.inject.Named.
New Batch Artefact wizard
-------------------------
Key: JBIDE-18950
URL:
https://issues.jboss.org/browse/JBIDE-18950
Project: Tools (JBoss Tools)
Issue Type: Sub-task
Components: batch
Affects Versions: 4.3.0.Alpha1
Reporter: Viacheslav Kabanovich
Assignee: Viacheslav Kabanovich
Labels: new_and_noteworthy
Fix For: 4.3.0.Alpha1
There are about 20 artefacts 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 artefacts. However, there is so much
common in them that it makes sense also have one wizard with list choice of artefact. When
a specific artefact should be created from the context of Batch XML editor, this wizard
can be invoked with selection of that artefact (list of artefacts may be disabled or
hidden).
1. Artefact 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 artefact. 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. Artefact class may declare fields, with values to be injected from properties set in
job xml element referencing that artefact:
{code}
@Inject @BatchProperty(name="property1") String property;
@Inject @BatchProperty String property2;
{code}
Thus, the wizard will have inputs as follows:
- Artefact: [combo]
- Source folder: [as in New Java Class wizard]
- Package: [as in New Java Class wizard]
- Class name: [text]
- [radio] implement interface [radio] extend abstract class (if class is not
available, the option is disabled)
- Reference name: (block of inputs)
| - [radio] Annotation Named [radio] batch.xml [radio] Qualified name
| - Name: [text] (for first 2 options filled with default value; for the last option
disabled)
- Properties: [table editor with 'Property name' and 'Field name'
columns]
Some more inputs may be inherited from New Java Class wizard, if default values are not
enough.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)