I agree to externalize as much as possible. If you have a good scheduler that handles dependencies and successors, use it. We use JMS in some case to fire events on completion.
Type: Posts; User: sky33; Keyword(s):
I agree to externalize as much as possible. If you have a good scheduler that handles dependencies and successors, use it. We use JMS in some case to fire events on completion.
I haven't used it, but take a look at JobStep. I typically use a Spring Integration message to kick off the next job.
The delimiter is only used to tokenize the contents of the file you are reading. The "names" attribute of DelimitedLineTokenizer is a String[] of column names and you configure this in the...
Have a look at this thread towards the bottom.
http://forum.springsource.org/showthread.php?48078-Using-2-different-datasources-with-Spring-Batch
The ItemProcessor is the way to go. You can think of the ItemProcessor as a transformer. Take an object of one type and transform it into an object of another type. In this case the target object...
Sorry didn't catch that you were using the Spring provided CompositeItemProcessor. Normally anytime I am doing composites, I create my own ItemProcessor to do this. I think what you would need to...
I agree. I am in the middle of a project to move off the mainframe and Spring Batch is a key part of that.
I think you are going to need to create a custom LineMapper and log then raw line in the mapLine method. If you don't like the idea of extending an existing line mapper, your custom LineMapper can...
try version 2.0.1 of the integration jars.
Yeah, the delegates will not get registered via the annotation. What I usually end up doing is something like:
@BeforeStep
public void beforeStep(StepExecution stepExecution)
{
...
In regards to holder objects, I really think that is what the ExecutionContext is for. There is a Step ExecutionContext and a Job ExecutionContext. Also remember that data in the ExecutionContext...
Add StepExecution as an attribute of your ItemWriter (you can do the same with your ItemReader or ItemProcessor). Then add the following code to your ItemWriter.
@BeforeStep
public...
Put the aggregated data in the StepExecution ExecutionContext. The ExecutionContext stores its data in a ConcurrentHashMap.
Tony, what does your custom writer look like? If you are are not batching inserts/updates I would look at doing that first. It can make a huge performance difference. Take a look at...
Hello Christian,
In your particular use case, I think you can get away with a single step using chunk processing:
1) Use a FlatFileItemReader to read the the file.
2) In in the init of your...
You need a more current version Spring Integration. Try 2.0.1 or later.
You can do something like the following in your reader, processor, or writer.
@BeforeStep
public void beforeStep(StepExecution stepExecution)
{
String params = (String)...
Try something like this where you write your own line mapper. Notice I didn't add the FieldSetMappers. I just made up that the indicator in the header is the first few characters.
public...
Looks like the error is: Attribute 'cron' is not allowed to appear in element 'poller'
What version of Spring Integration are you pulling in? It looks like the cron attribute was added in release...
Have a look at http://static.springsource.org/spring-batch/reference/html-single/index.html#multiLineRecords. Basically you end up delegating to a FlatFileItemReader to call read multiple times...
What I am finding is that for most process/workflow types of things I am using a combination of Spring Integration and Spring Batch. I use Spring Integration for the inbound and outbound application...
Depends on what you are writing, but sometimes you can determine the specific item that failed without doing something like using a chunk size of 1. For example, if you are doing Batch...
This is another area that I have used Spring Integration in combination with Spring Batch. If I need to trigger a another job execution from anywhere in a running job, I just dump a message to a...
OK, I think I am going to make an attempt at writing a Db2PagingQueryProvider that uses doesn't use the SqlWindowingPagingQueryProvider and does something similiar to the MySqlPagingQueryProvider,...
We use Spring Integration in combination with Spring Batch which would accomplish what you are looking for. Spring Integration provides many options for allowing external triggering of Batch...