Announcement Announcement Module
Collapse
No announcement yet.
Spring Batch Admin configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Batch Admin configuration

    When setting up the Spring Batch Admin Console on WebSphere 6.1 with Java 2 Security enabled, I was getting permission denied errors when writing to "target/data".

    I'd like to configure this path to a custom directory, it looks like it comes from org.springframework.batch.admin.integration.FileUp loadRequestToFileAdapter which has a default directory of "target/data".

    This class is created in META-INF/spring/batch/servlet/manager/integration-context.xml with no way to customize the directory.

    Code:
    <integration:service-activator input-channel="file-requests" output-channel="input-files">
        <bean class="org.springframework.batch.admin.integration.FileUploadRequestToFileAdapter"/>
    </integration:service-activator>
    It also looks like I can't override the bean itself by adding a configuration file to the META-INF/spring/batch/override folder.

    So far, the only solution I found to change this folder was to hard code the directory and replace the integration-context.xml file in the jar. Obviously, this is not my prefered choice.

    Is there a better way of configuring this directory, or should this be raised in JIRA?

    Thanks.

  • #2
    You normally override beans in the servlet context using META-INF/spring/batch/servlet/override/*.xml (not META-INF/spring/batch/manager/override) so in principle it is possible. In practice, however, this bean doesn't have an ID so it will be hard to override. If you raise a JIRA issue we can pull it out into an overridable bean definition.

    A workaround is to change your web.xml to load a different set of XML files in the DispatcherServlet declaration, and exclude this one.

    Comment


    • #3
      Update on this: it looks like FileUploadRequestToFileAdapter has been removed from trunk anyway, so if there is an issue it is only in 1.0.0.

      Comment

      Working...
      X