Questions tagged [jberet]

JBeret provides an open-source Java batch processing framework based on JSR 352 (Batch Applications for the Java Platform).

72 questions
8
votes
3 answers

How to put in custom scope/context (JobScoped - custom CDI scope) particular instance from request to make it injectable?

Saying in a nutshell I would like to put in custom scope particular instance of Configuration class from rest request. Main problem is that custom scope (JobScoped from JBeret…
rtbf
  • 1,509
  • 1
  • 16
  • 35
5
votes
1 answer

jsr 352 batch with retryable and skippable exception may processes items many times

I have a batch implemented with JSR-352 (using jberet on wildfly). I have a chunk with item-count 15 and java.lang.Exception is configured as retryable and skippable exception. When there are many exceptions, most of the items will be processed…
cornz
  • 641
  • 4
  • 18
4
votes
1 answer

Add prefix to JSR 352 Batch API tables

I'm currently using JSR 352 Batch API in Jboss/CDI environment (JBeret implementation). I didn't find into JSR and JBeret documentation how to add prefix the specifics batchs tables (STEP_EXECUTION, JOB_EXECUTION, JOB_INSTANCE ...). Example :…
antoine.lange
  • 731
  • 6
  • 24
3
votes
1 answer

Java batch: How to programmatically determine which partition you are running?

In a JSR-352 batch I want to use partitioning. I can define the number of partitions via configuration or implement a PartitionMapper to do that. Then, there are the JobContext and StepContext injectables to provide context information to my…
JimmyB
  • 12,101
  • 2
  • 28
  • 44
3
votes
1 answer

Java-Batch: How to pass data from one step to another step?

in my JBeret java-batch job I need to pass parameters from one step to the next step. So far I have only figured out to do that via JobContext.setTransientUserData(). My questions are: Is the transientUserData way the best-practice way or are there…
uwl
  • 33
  • 5
2
votes
1 answer

CDI not working with Java EE Batch under jberet implementation

I have a Java EE batch application implemented with jberet deployed on WildFly application server. This application also expose a REST api to trigger a job on demand. I have following class creating beans to be injected: public class Factory { …
adesai
  • 370
  • 3
  • 22
2
votes
1 answer

Java Batch Step with partition returns wrong batchStatus and exitStatus

I have a (very simple) java batch job in JDL with just two steps. When the step "download" return the status "STOPPED" the job should stop. After restart the stop notify should be called. Without the partition everything works fine. stats without…
unclescrouge
  • 403
  • 5
  • 10
2
votes
2 answers

JSR352: Annotation @Named doesn't work in Java SE

I'm building a demo of JSR352 (Batch Applications for the Java Platform) under Java SE, using the JBoss implementation JBeret. And I want to run the integration test for this job. In this batch job, there're 3…
Mincong Huang
  • 5,284
  • 8
  • 39
  • 62
2
votes
2 answers

JSR 352: Wildfly9 / JBeret - How to call a batch job that it is not contained at the same deployment file level

I have a WAR application that includes a JAR library. The JAR library contains the Batch Job and the Batch Artifacts (META-INF/batch-jobs/...). The WAR app includes this jar as a library and defines a JAX-RS Service that allows to clients to invoke…
Carlitos Way
  • 3,279
  • 20
  • 30
2
votes
3 answers

How can I synchronize a jBatch execution?

I'm writing a jBatch program with jBeret. I am currently doing like this. final JobOperator operator = BatchRuntime.getJobOperator(); logger.debug("operator: {}", operator); final long id = operator.start("some", null); logger.debug("id: {}",…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
1
vote
0 answers

JBeret in Java EE environnement that is not Wildfly

I'm trying to use JBeret implementaton of JSR352 in an EE environment but not Wildfly/JBoss. I'm working with JBeret 1.4.7.Final deployed on Open Liberty 21.0.0.12. I know that Open Liberty have its own JSR352 implementation but I'm interested by…
Clément Honoré
  • 137
  • 1
  • 12
1
vote
1 answer

How to prevent the parallel execution of a Step used in two Jobs in JBeret?

I am using JBeret on Wildfly, lets say I have Job1 that consists of StepA, StepB, StepC. Lets say I have Job2 that consists of StepB. Now, when both Jobs run at the same time, I would like to prevent StepB to be executed in prallel. Meaning Job1…
Thomas
  • 620
  • 7
  • 19
1
vote
1 answer

JSR 352 - Java batch - Cannot inject service bean or DAO in listener artifacts

In a batch project, I need to load some reference data from the database before processing. I am trying to do so by injecting a service bean in the JobListener and loading the data in the "beforeJob" method but the serviceBean is always null. public…
Sandy
  • 547
  • 3
  • 9
  • 20
1
vote
1 answer

How to control Java batch exit status

I am trying to improve exit information for some JSR-352 batch job. So far I use Wildfly (and the included JBeret implementation), and my last batch step returns batch status: COMPLETED exit status: WARNING However, when looking from 'outside' at…
Queeg
  • 7,748
  • 1
  • 16
  • 42
1
vote
1 answer

JBeret-UI support for multiple rest services

I'm trying to use Scheduler with JBeret-UI to start jobs from several rest services. I already set the restUrl in config.json to a batch rest service running in wildfly and it works ok, the jobs of that service are available in the scheduler. But…
jgoncalves
  • 21
  • 3
1
2 3 4 5