Hopefully this is a simple question. I have a configuration that sets up several jobs. My infrastructure code sets up a job registry which then uses the registry to retrieve a job by name based on some criteria that is dynamically passed in. Once a job is identified, it is retrieved from the registry and launched.
Here is an example of my registry def in my infrastructure xml:
<bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.ClassPathXmlJobRegistry">
My problem is that when I go to reference a bean that is defined in my infrastructure context (service bean, dao, etc..), they are not found.
Is there a better way to set this up? I need the ability to define several jobs and pull them out of a registry dynamically. It's clear that the job fished out of the registry does not contain references to beans in the parent context. I'd like to make this possible.