Spring batch Performance Issue - StaxEventItemReader and JAXB
Hello anyone who can help me,
I am using StaxEventItemReader and JAXB for marshalling and unmarshalling.
but I observed that the performance of treating an XML file is not good enough and I get out of memory exception.
I am trying to use another unmarshaller - xstreammarshaller , JIXB, xmlbeans, castor
Has anyone faced this kind of issues using spring batch?
Could anyone inform me which is the best performing marshaller please?
<step id="readWriteXMLAction" next="limitDecision">
<tasklet allow-start-if-complete="true">
<chunk commit-interval="1" reader="myItemReaderExp" writer="myItemWriter"
skip-limit="50">
<listeners>
<listener ref="writeListener" />
<listener ref="readListener" />
<listener ref="promotionListener" />
</listeners>
<skippable-exception-classes>
<include class="be.fgov.ehealth.cobrha.batchpublish.excepti ons.OperationFailedException"/>
</skippable-exception-classes>
</chunk>
</tasklet>
</step>
....
<bean id="myItemReaderExp" scope="step" class="be.fgov.ehealth.cobrha.batchpublish.reader. BPubOperationReader">
<property name="fragmentRootElementName" value="cdm" />
<!--<property name="resource" value="#{jobExecutionContext[outputFile]}" /> -->
<!-- <property name="resource" value="file:/#{jobParameters['targetDirectory']}/#{jobExecutionContext[outputFile]}" /> -->
<!-- <property name="resource" value="test" /> -->
<property name="unmarshaller" ref="xstreamMarshaller" />
<property name="batchpubXSDValidator" ref="batchPubXSDValidatorRef"></property>
<property name="xsdLocationList">
<list>
<value>$batchpub{batch.operationalxml.xsd.location 1}</value>
<value>$batchpub{batch.operationalxml.xsd.location 2}</value>
</list>
</property>
<property name="followupservice" ref="followUPService" />
<!-- <property name="auditservice" ref="auditService"></property> -->
<property name="reportservice" ref="reporBuilderService" />
<!-- <property name="completionPolicy" ref="completionPolicy" /> -->
<!-- <property name="limitDecider" ref="limitDecider"></property> -->
</bean>
...
<bean id="xstreamMarshaller"
class="org.springframework.oxm.xstream.XStreamMars haller">
<property name="aliases">
<props>
<prop key="cdm">be.fgov.ehealth.cobrha.cdm.v1.CDM</prop>
</props>
</bean>