Skip to content

Commit

Permalink
Fixed major issue with deleteBeforeWrite
Browse files Browse the repository at this point in the history
  • Loading branch information
jbornemann committed Aug 21, 2015
1 parent 27fdb4e commit 60ad22d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
<property name="corePoolSize" value="10"/>
</bean>

<!-- A Bean for executing several pre-sync tasks concurrently -->
<bean id="asyncTaskExecutor" class="org.springframework.core.task.SimpleAsyncTaskExecutor" />

<!-- A Bean that provides ExecutionContextSerializer for JcrExecutionContextDao -->
<bean id="executionContextSerializer"
class="org.springframework.batch.core.repository.dao.DefaultExecutionContextSerializer" />
Expand Down
30 changes: 13 additions & 17 deletions grabbit/src/main/resources/META-INF/spring/client-batch-job.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,19 @@
<import resource="client-deleteBeforeWrite-steps.xml" />

<batch:job id="clientJob" xmlns="http://www.springframework.org/schema/batch" job-repository="clientJobRepository">
<!-- Do any presync tasks concurrently that we can, e.g turning off workflows -->
<batch:split id="preSyncFlow" task-executor="asyncTaskExecutor" next="clientNamespaceSync">
<batch:flow>
<batch:step id="clientWorkflowOff">
<batch:tasklet ref="clientWorkflowOffTasklet" transaction-manager="clientTransactionManager"/>
</batch:step>
</batch:flow>
<batch:flow>
<batch:decision id="deleteBeforeWriteDecision" decider="deleteBeforeWriteDecider">
<end on="NO"/>
<next on="YES" to="deleteBeforeWrite" />
</batch:decision>
<batch:step id="deleteBeforeWrite">
<batch:tasklet ref="deleteBeforeWriteTasklet" transaction-manager="clientTransactionManager"/>
</batch:step>
</batch:flow>
</batch:split>

<batch:step id="clientWorkflowOff" next="deleteBeforeWriteDecision">
<batch:tasklet ref="clientWorkflowOffTasklet" transaction-manager="clientTransactionManager"/>
</batch:step>

<batch:decision id="deleteBeforeWriteDecision" decider="deleteBeforeWriteDecider">
<next on="NO" to="clientNamespaceSync"/>
<next on="YES" to="deleteBeforeWrite" />
</batch:decision>

<batch:step id="deleteBeforeWrite" next="clientNamespaceSync">
<batch:tasklet ref="deleteBeforeWriteTasklet" transaction-manager="clientTransactionManager"/>
</batch:step>

<!-- Writes JCR namespaces streamed from the server-->
<batch:step id="clientNamespaceSync" next="clientJcrNodes">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<bean id="deleteBeforeWriteDecider" class="com.twcable.grabbit.client.batch.steps.workspace.DeleteBeforeWriteDecider" />
<bean id="deleteBeforeWriteTasklet" class="com.twcable.grabbit.client.batch.steps.workspace.DeleteBeforeWriteTasklet" scope="step">
<constructor-arg name="jobPath" value="#{jobParameters[path]}" />
<constructor-arg name="excludePaths" value="#{jobParameters[path]}" />
<constructor-arg name="slingRepository" value="slingRepository" />
<constructor-arg name="excludePaths" value="#{jobParameters[excludePaths]}" />
<constructor-arg name="slingRepository" ref="slingRepository" />
</bean>
</beans>

0 comments on commit 60ad22d

Please sign in to comment.