Questions tagged [jsr352]

JSR 352: Batch Applications for the Java Platform

JSR 352 specifies a programming model for batch applications and a runtime for scheduling and executing jobs.

https://jcp.org/en/jsr/detail?id=352

151 questions
1
vote
1 answer

Stopping a JSR batch application during operation without throwing exception

We have a jsr 352 java batch application that we are wanting to stop the execution early if a condition is met but not throw an exception. The basic layout of our job is as follows:
jworrin
  • 825
  • 1
  • 8
  • 20
1
vote
1 answer

JSR352 decide next step based on return parameter from Decider

I would like to implement a Decider that returns the ID of the next step that needs to be executed. (This question is related to my other question here if you would like to know why I'm trying to do this: JEE Batch Job Specification with many…
taranaki
  • 778
  • 3
  • 9
  • 28
1
vote
0 answers

JSR 352 Batch | java.sql.SQLRecoverableException: Closed Connection

I am trying to run a jee batch application. It works fine in my local machine but when I am trying to run the same jee application in a docker container, I am getting the below exception in…
Chirag
  • 211
  • 4
  • 16
1
vote
4 answers

JEE Batch Job Specification with many optional Steps

Is there a way to achieve the following logic with JSR 352 Batch API? I have a series of Steps that each need to be executed based on a different condition known when starting the job. ConditionsEntity is provided by an external system. public…
taranaki
  • 778
  • 3
  • 9
  • 28
1
vote
1 answer

In jsr352 batch job xml, how to read/inject a environmental variable from system

I have environmental variable called ENV, which holds the DEV,QA OR PROD region as value. When the server.xml loaded it includes the corresponding db configuration using this variable. For ex: db-config-${env.GAH_ENV}.xml I would like to pass the…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
1 answer

Job not stopping when the stop request made through postman

I am using IBM liberty server and running jsr 352 batch job. Launching a batch job using postman as rest call. But when I tried to stop the job using the instanceid, its saying status as "STOPPING" and it's takes own time to stop. sometimes it's in…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
3 answers

How to poll BatchStatus for an executing job?

I have a batch job which has to be repeated for a list of items. So I have a "parent" job which uses a batchlet step to load the list and start a child job for each id in the list. Each child job is launched using JobOperator and param using…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
1 answer

Transaction timeout on step level vs server.xml

On JSR-352 batch, I'm defining a transaction timeout in step level for chunk processing as 900s. At the same time I have transaction timeout mentioned in server.xml as 1800s. this chunk processing step is partitioned using PartitionMapper step. My…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
2 answers

Liberty Batch not throwing exception when job launched with same input parameter where as spring batch does(JobInstanceAlreadyExistsException)

I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
2 answers

How do I restart a failed JSR-352 job running in Liberty through Eclipse / WDT?

While running the Java EE Batch job through eclipse, it is creating a new instance of it. I wanted to re-run the failed instance so that it can use checkpoint information to resume from the failed point.
Chirag
  • 211
  • 4
  • 16
1
vote
1 answer

How to identify an exception(which is happened from ItemReader, readItem method) in ItemWriter

In JSR352 batch, I am running a partitioned step to create multiple JSON objects. Each thread, reads some data from oracle and write as JSON object. In some cases, the resultSet.next() getting timed out and throws an exception and going to close()…
user3540722
  • 175
  • 1
  • 2
  • 11
1
vote
1 answer

How to get configured retryable/skippable exceptions in jsr352

I'd like to write some generic batch listeners to log out some useful information of all batches configured in my application. To do so I'd like to get the configured skippable/retryable exceptions from batch configuration. However I did not find…
cornz
  • 641
  • 4
  • 18
1
vote
1 answer

Scope conflicts until batch job finished?

Tech stack: JBeret (core, se) 1.3.0.Final Hibernate Search (orm, jsr352-core, jsr352-jberet) 5.10.4.Final Weld (servlet-core, se-core) 3.0.5.Final If I trigger BatchRuntime.getJobOperator().start( MassIndexingJob.NAME, …
zeitiger
  • 177
  • 2
  • 11
1
vote
1 answer

How to authorize a Java Batch job so it can run from a startup bean in WebSphere Liberty?

I am trying to submit a basic batch job from within my startup bean, which is giving me an error message of "User UNAUTHENTICATED is not authorized to start batch jobs." This is my startup bean: @Singleton @Startup public class ControllerBean { …
1
vote
1 answer

Design of JSR352 batch job: Is several steps a better design than one large batchlet?

My JSR352 batch job needs to read from a database, and then depending on the result flows to one of two pathways, each of which involves some more if/else scenarios. I wonder what the pros and cons between writing a single step with a large…
Treefish Zhang
  • 1,131
  • 1
  • 15
  • 27