Questions tagged [java-batch]

84 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

How do I configure a transaction timeout in WebSphere Liberty Batch?

What is the role of javax.transaction.global.timeout? Do I need to implement the checkpointTimeout() method in CheckpointAlgorithm? Is there anything at the server config level? How does this interact with whatever is set at the application…
Scott Kurz
  • 4,985
  • 1
  • 18
  • 40
4
votes
2 answers

JSR 352 :How to collect data from the Writer of each Partition of a Partitioned Step?

So, I have 2 partitions in a step which writes into a database. I want to record the number of rows written in each partition, get the sum, and print it to the log; I was thinking of using a static variable in the Writer and use Step Context/Job…
Fazil Hussain
  • 425
  • 3
  • 16
4
votes
1 answer

JSR 352 with Liberty Profile - how to implement checkpointing when ItemReader does a DB query

I have 10 records in my source table and I am having item count as 3. I have 2 partitions to process these 10 records(i.e first 5 records will be processed in first partition and remaining records processed in 2nd partition while processing records…
3
votes
1 answer

WebSphere Liberty - Batch reader/writer/etc. not showing updated values when job is re-run with different job parameter values

When I ran a job multiple times on the liberty server it allways takes the parameter values of my first job ran although I changed the values. So I can't run the job multiple times with different parameter values. Why? What happens if I run several…
3
votes
1 answer

Batch job definition: How to run a dynamically-calculated number of partitions?

As a newbie to the Batch Processing API (JSR-352), I have some difficulties modeling the following (simplified) scenario: Suppose we have a Batchlet that produces a dynamic set of files in a first step. In a second step, all these files must be…
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
3
votes
1 answer

Schedule a Cron like job in EJB

I have following EJB, which is scheduling 'MyJob' with fixed delay. @Startup @Singleton public class Scheduler { static final long INITIAL_DELAY = 0; static final long PERIOD = 5; @Resource ManagedScheduledExecutorService…
adesai
  • 370
  • 3
  • 22
3
votes
1 answer

NullPointerException running Batch job in WebLogic with managedScheduledExecutorService

I use batch job in my project and i deployed it on weblogic. I set datasource and schema name in weblogic console. When I want to start job by running BatchRuntime.getJobOperator().start("test-job", new Properties())i got below…
moh m
  • 51
  • 6
3
votes
2 answers

JSR-352 Java Batch: why does JobListener.afterJob() always get batch status STARTED?

I'm a Java Batch newbie. I deployed a simple batch job that includes a JobListener on WebSphere Liberty 17.0.0.4 (note that I'm using IBM's JSR-352 implementation, not Spring Batch). The batch job itself runs as expected: it reads an input file,…
Mike Woinoski
  • 3,123
  • 1
  • 16
  • 15
3
votes
0 answers

Clear glassfish Batch Job Executions

I'm looking a way to clear each day the glassfish batch log from my java application (via batchlet or ejb timer). Maybe another way could be to keep only the failed job and purge the success batch, is it possible to do it? Thanks, Ersch
Ersch
  • 173
  • 2
  • 15
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
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
3
votes
1 answer

Are batchlets the correct way of implementing ETL steps in JavaEE Batch?

I am studying Javaee Batch API (jsr-352) in order to test the feasibility of changing out current ETL tool for our own solution using this technology. My goal is to build a job in which I: get some (dummy) data from a datasource in step1, some…
JSBach
  • 4,679
  • 8
  • 51
  • 98
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
1
2 3 4 5 6