|
Hello! Anyone still interested in this issue? If so, please give some more information! Here is some detail - We have a channel, which receives a request from JMS queue and transfers control to a Business service (NOT SI component). Can you provide a configuration excerpt? When you use a "ref" from a Spring Integration component (e.g. service-activator), that reference may be to a prototype bean. It's just like any other bean reference. However, as with any other bean reference the injection happens only once. This is the way "prototype" scope works in Spring generally. What it does mean is that any other "ref" would hold a distinct instance. When you say that you want to instantiate the bean "when the flow is triggered", I believe you might be looking for something more like a custom scope? i.e. a "flow" scope that would act similar to a "request" scope in a web application. Is that the case? If so, then the next question would be why do you need that scope? I assume that you have something stateful, whereas the main idea in Spring Integration is to keep all state in the Message (payload and headers) while using stateless services. Can you please provide some information about the stateful requirements of your services? Thanks, |
|||||||||||||||||||||||||||||||||||||||
Hello
Can you please describe what is the kind of bean you want to be a prototype? Is this some Spring-Integration specific bean (channel, transformer, selector) or some business component (e.g. ServiceActivator)?
Your scenario may be implemented using some FactoryBean, which produces new objects in it's getObject() method.
Regards
Grzegorz Grzybek