Back Forum Reply New

Parent Context Bean References Missing

Hello,

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:Code:
lt;bean id=quot;jobRegistryquot; class=quot;org..batch.core.configuration.support.ClassPathXmlJobRegistryquot;gt;
lt;property name=quot;jobPathsquot;gt;
lt;listgt;
lt;valuegt;WEB-INF/jobs/...

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.

Thanks,

Alejandro

What is your quot;infrastructure contextquot;?  If it is the one containing the ClassPathXmlJobRegistry then its beans should be available for DI in the child contexts.  What is it that you see going wrong?
¥
Back Forum Reply New