Skip to content

Commit

Permalink
JBIDE-20147 Batch Property mapping issue with reference
Browse files Browse the repository at this point in the history
  • Loading branch information
scabanovich committed Jul 10, 2015
1 parent e7ea020 commit 2e5b3cd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package batch;

import javax.batch.api.AbstractBatchlet;
import javax.inject.Named;

@Named(MyBatchletNamedWithConstant.NAME)
public class MyBatchletNamedWithConstant extends AbstractBatchlet {
public static final String NAME = "batchlet_named_with_constant";

public MyBatchletNamedWithConstant() {
// TODO Auto-generated constructor stub
}

@Override
public String process() throws Exception {
// TODO Auto-generated method stub
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,8 @@ public void testArtifactRegisteredInBatchXML() {
assertArtifactByNameAndType("my_other_job_listener", BatchArtifactType.JOB_LISTENER, false);
}

public void testBatchletNamedWithConstant() {
assertArtifactByNameAndType("batchlet_named_with_constant", BatchArtifactType.BATCHLET);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void test() {
}

private void checkStep1(Step step) {
checkProposals((Batchlet) step.getBatchletOrChunk().get(0), 4);
checkProposals((Batchlet) step.getBatchletOrChunk().get(0), 5);
}

private void checkStep2(Step step) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void setDefinition(TypeDefinition def) {

void initName() {
if(definition.getNamedAnnotation() != null) {
Object v = definition.getNamedAnnotation().getMemberValue(null);
Object v = definition.getNamedAnnotation().getMemberValue(null, true);
if(v != null) {
name = v.toString();
} else {
Expand Down

0 comments on commit 2e5b3cd

Please sign in to comment.