java-batch

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

会有一股神秘感。 提交于 2019-12-04 03:47:44
问题 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 in 2nd partition I am throwing an exception so job will be failed at 2nd chunk of 2nd partition.when I am restarting the job ,failed partition is processing all the records again(that is first chunk and 2nd chunk). Restarting the job should only

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

本小妞迷上赌 提交于 2019-12-03 09:51:46
问题 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 https://jberet.gitbooks.io/jberet-user-guide/content/custom_cdi_scopes/index.html) is eligable after job starts. I know that there is possibility to add properties when starting job but my Configuration class agregates a lot of configurations and it's quite complicated so it would by very uncomfortable to convert this

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

余生长醉 提交于 2019-12-03 01:29:56
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 https://jberet.gitbooks.io/jberet-user-guide/content/custom_cdi_scopes/index.html ) is eligable after job starts. I know that there is possibility to add properties when starting job but my Configuration class agregates a lot of configurations and it's quite complicated so it would by very uncomfortable to convert this files to Properties class. Details below: This is rest request pseudocode: @Path("/job") public class

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

帅比萌擦擦* 提交于 2019-12-01 19:14:02
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 in 2nd partition I am throwing an exception so job will be failed at 2nd chunk of 2nd partition.when I am restarting the job ,failed partition is processing all the records again(that is first chunk and 2nd chunk). Restarting the job should only process from last failed chunk records but not all the records in that partition.Can you please guide me

In a (Liberty) Batch chunk step, getting “ResultSet is closed” when scrolling through ResultSet from database query issued earlier in the step

China☆狼群 提交于 2019-12-01 13:15:15
I am reading data from DB2 table and dumping it into a file. I execute my simple select query in the chunk listener's beforeChunk() and use the step context to get it in itemreader. In the chunk i set the checkpoint policy as item and itemcount as 5. The output is the first 5 records being read and written over and over again. In this sample java batch code from IBM's site they have start and end parameters in the query. Is it necessary to have start and end parameters in your query? Is there no other way to make sure that when the query is run again it reads the next chunk of data and not the

In a (Liberty) Batch chunk step, getting “ResultSet is closed” when scrolling through ResultSet from database query issued earlier in the step

孤人 提交于 2019-12-01 09:57:09
问题 I am reading data from DB2 table and dumping it into a file. I execute my simple select query in the chunk listener's beforeChunk() and use the step context to get it in itemreader. In the chunk i set the checkpoint policy as item and itemcount as 5. The output is the first 5 records being read and written over and over again. In this sample java batch code from IBM's site they have start and end parameters in the query. Is it necessary to have start and end parameters in your query? Is there