hi ..
i am trying to configure the http adapters b/w spring batch and integration. my app (spring-batch-admin) exposes a lightweight spring integration context which launches jobs. the configs are as follows
The job is launched asynchronouslyCode:<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" /> <int-http:inbound-channel-adapter id="batchHttpAdapter" name="/someJobs" message-converters="stringMessageConverter" channel="job-launches" supported-methods="POST" /> <bean id="stringMessageConverter" class="org.springframework.http.converter.StringHttpMessageConverter" /> <int:service-activator input-channel="job-launches" output-channel="batchJobRequests"> <bean class="org.springframework.batch.admin.integration.StringToJobLaunchRequestAdapter"> <property name="jobLocator" ref="jobRegistry" /> </bean> </int:service-activator> <int:service-activator input-channel="batchJobRequests"> <bean class="org.springframework.batch.integration.launch.JobLaunchingMessageHandler"> <constructor-arg ref="jobLauncher" /></bean> </int:service-activator>
On the client side requests are sent as follows (from another app )Code:<task:executor id="asyncExecutor" pool-size="10"/> <bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"> <property name="jobRepository" ref="jobRepository" /> <property name="taskExecutor" ref="asyncExecutor"></property> </bean>
How do i configure the client to receive the response which is the JobExecution ?Code:<int-http:outbound-gateway url="http://someurl:port/spring-batch-admin/someJobs" request-channel="someChannel" http-method="POST"></int-http:outbound-gateway>
Thanks


Reply With Quote
