Hi Guys,
I'm working on we server analyzing tool. The aim is to analyze each request to display information about requester.
The application define an Entity Project representing a web application to analyze.
Each Project instance, formely a JPA Entity, can have multiple logFile with different format.
The application must , at regular time interval, to read device access from log files, and create some LogEntryItem to persist on DB.
I want to define a Job composed by several Steps. Each step handle single LogFile.
This is the step definition:
The job must be called (by quartz i hope) for each running project. But each project has different number of handlig logFile, so the job can have different number of step.Code:<batch:step id="updateFileLogStep"> <batch:tasklet reader="logFileReader" writer="logFileWriter" processor="logFileProcessor" commit-interval="1000"> <!-- --> </batch:tasklet> </batch:step> <bean id="logFileReader" class="org.springframework.batch.item.file.FlatFileItemReader" scope="step"> <property name="resource" value="#{stepExecutionContext[logFile.url]}" /> <property name="lineMapper" value="#{stepExecutionContext[logFileFormat.lineMapper]}" /> </bean> <bean id="logEntryItemWriter" class="net.sourceforge.wurfl.wla.logic.batch.LogEntryItemWriter" scope="step"> <constructor-arg ref="logEntryRepository" /> </bean> <bean id="logEntryItemProcessor" class="net.sourceforge.wurfl.wla.logic.batch.LogEntryItemProcessor" scope="step"> <constructor-arg ref="runningService" /> </bean>
Ho ca I handle this situation? I must create subclass of SimpleJob?
Thank a lot for your time, and excese me for my poor english.


Reply With Quote
