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
3
votes
1 answer

JSR 352 - Why does exception included in stop the job

I am trying to create a simple batch application using JSR 352 with Websphere Liberty Profile 17.0.0.2. Everything seems to be working fine until getting into exception handling. I am under the assumption that exceptions thrown by the application…
joe777baba
  • 33
  • 4
3
votes
1 answer

Why is there a checkpointInfo in ItemWriter interface for JSR 352? Any sample implementation?

Why is there a checkpointInfo method in Jsr 352 ItemWriter interface. How do the reader and writer communicate on what is being committed
3
votes
1 answer

Quartz-scheduled JSR-352 jobs on GlassFish won't start

My goal is starting JSR-352 batch jobs through a Quartz scheduler on a GlassFish server, but there's a big issue. First of all, here's my code. My JSR-352 job:
hyuil
  • 33
  • 4
3
votes
1 answer

JSR 352 How to store an object (java.lang.Object) as a job property?

In JSR352 1.0 Final §9.3 Batch Properties, the batch properties is defined to be type java.lang.String: Batch applications need a way to receive parameters when a job is initiated for execution. Properties can be defined by batch programming model…
Mincong Huang
  • 5,284
  • 8
  • 39
  • 62
3
votes
1 answer

JSR 352: What are the best practices for Java Batch to ensure maximum performance and efficiency?

I am doing a typical read from a DB, and I'm going to process and write to a file step on a Dataset that has many millions (>10 million) of records. Is there anything from a Design or Architecture point of view that should be kept in mind? Also are…
Fazil Hussain
  • 425
  • 3
  • 16
3
votes
2 answers

JSR 352: Is there a way to tell if a particular job execution is a restart or not from within a job?

I know how to get the Execution Id and Instance Id of a job using the Job Context. But if i restart a job, is there way to know if the job execution is the first execution or a restart within the job, for instance inside the reader?
Fazil Hussain
  • 425
  • 3
  • 16
2
votes
1 answer

How to use dynamic values in JSL in a JSR-352 Java Batch application

Is there a syntax to use dynamic values in the JSL (Job Specification Language) file of a JSR-352 Java Batch application? My specific case is to be able to change the value of the item-count attribute in my chunk element on the fly (no code change,…
maxime.bochon
  • 581
  • 4
  • 14
2
votes
2 answers

configuring dev and prod datasource in liberty dynamically to load based on the environment

I am running java batch(jsr352) using liberty server. The datasource configured in server.xml. I would like to load server.xml based on the region(like dev, sit, prod). How can I pass arguments to start liberty server and load the datasource…
user3540722
  • 175
  • 1
  • 2
  • 11
2
votes
2 answers

Issue deserializing checkpoint info restarting JSR352 Job - ClassNotFoundException: [B

I have a partitioned job that reads from and writes to a DB. I have a chunking size of 10. If a partition fails and i want the restart to happen from the last commit, I have overwritten the checkpointinfo method and wrote my logic according to my…
Edge
  • 55
  • 6
2
votes
2 answers

Spring Batch not seeing H2 DataSource bean in Spring Boot application

For a small test application, I'm using Spring Boot and Spring Batch, limited to the JSR-352 functionality. The problem that I'm encountering is that Spring Batch does not see the H2 database that Spring Boot has automagically created. When I try to…
SeverityOne
  • 2,476
  • 12
  • 25
2
votes
2 answers

Running Java batch deployed in Liberty profile on z/OS

Is the approach of running java batch programs in Liberty profile (supporting JSR352 specification) on z/OS relatively new to the market or been for a long time ? The reason behind this question is because, am hearing that this is a relatively…
yathirigan
  • 5,619
  • 22
  • 66
  • 104
2
votes
1 answer

Batch job is stuck at STARTING when submited from a JMS Listener onMessage()

I'm trying to start batch jobs according to JSR 352 specifications using JobOperator obtained from BatchRuntime in an onMessage(...) method in a JMS MessageListener. JobOperator jobOperator = BatchRuntime.getJobOperator(); Properties props = new…
kosgeinsky
  • 508
  • 3
  • 21
2
votes
2 answers

Can I run a batch jobs on another dedicated thread pool?

Is it possible to run a batch job (JSR-352 Batch Processing) on another dedicated thread? In my application I have several tasks that I would like to execute on another dedicated thread pool. Besides, I have tasks to execute on the default half of…
ostry
  • 117
  • 1
  • 2
  • 8
2
votes
1 answer

JSR-352 with Liberty Profile - 'ORA-01002: fetch out of sequence'

I am experimenting with the JSR-352 implementation in the Liberty Profile and have been stumped by an 'ORA-01002: fetch out of sequence' error after my reader processes the first 10 items of my JDBC ResultSet. My chunk size is set to 100. Here is…
2
votes
2 answers

JSR:352 Unit testing Java Batch Code?

Can we use JUnit to test java batch jobs? Since Junit runs locally and java batch jobs run on the server, i am not sure how to start a job (i tried using using the JobOperator class) from JUnit test cases. If JUnit is not the right tool, how can we…
Fazil Hussain
  • 425
  • 3
  • 16
1
2
3
10 11