Spring is a pretty well defined API. I don't see why calling it programatically is a bad thing. Specifying configuration is preferable, but sometimes you need to get creative.
Spring itself still doesn't handle run-time configuration as well as some people need. Mostly because static configuration handles most cases.
See if you can do something like this:
Code:
<bean id="distributedImageProcessor" class="DistributedImageProcessor">
<properties go here/>
</bean>
<bean id="customMessageListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer" scope="prototype"
<property name="someProperty">
<bean class="org.springframework.beans.factory.config.PropertyPathFactoryBean">
<property name="targetObject" ref="distributedImageProcessor"/>
<property name="propertyPath" value="imageProperty"/>
</bean>
</property>
</bean>
Basically what this would do is allow you to create a new DefaultMessageListenerContainer based on the current properties of your DistributedImageProcessor. That of course assumes your DistributedImageProcessor is a singleton bean in your application context.
If its a regular singleton with a factory method like getInstance you can get a reference to the object in your application context like this:
Code:
<bean id="distributedImageProcessor" class="DistributedImageProcessor"
factory-method="getInstance"/>