Results 1 to 2 of 2

Thread: Parent Context Bean References Missing

  1. #1
    Join Date
    Jul 2008
    Posts
    21

    Default 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:
    	<bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.ClassPathXmlJobRegistry">
    		<property name="jobPaths">
    			<list>					
    				<value>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

  2. #2
    Join Date
    Jun 2005
    Posts
    4,232

    Default

    What is your "infrastructure context"? 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?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •