Updating myself instead of anyone else working on this.
On 11/18/2010 11:58 AM, Tarjei Huse wrote:
> Hi, this is so related that I think it is not thread hijacking.
> On 11/18/2010 11:30 AM, Claus Ibsen wrote:
>>> @Produce(uri = "direct:start")
>>> protected ProducerTemplate template;
> What is required for Camel to find and add a proxy where this annotation
> is found?
>
> I got a class that is autowired in spring using the @Service annotation
> and where I use:
> @Produce(ref="requestLogger")
> private IRequestLogSender requestLogSender;
>
> Where the interface is:
>
> public interface IRequestLogSender {
> @InOnly
> public void notifyAnalyzer(byte[] requestDoneMessage) throws
> InvalidProtocolBufferException;
> }
>
> I tried to switch the @Produce annotation to use uri instead of ref.
> Also I tried adding @Autowired, but then I get No unique bean of type
> [com.scanmine.scheduler.queuehandler.IRequestLogSender] is defined:
> Unsatisfied dependency of type [interface
> com.scanmine.scheduler.queuehandler.IRequestLogSender]
>
> What are the requirements to get this to work?
The problem turned out to be a simple one:
- make sure you include camel-context.xml in your application context!
- the class must be wired by spring - either though component scanning
or as a bean deined in spring xml.
There might be other problems, the first one of these was mine.
Tarjei
>
--
Regards / Med vennlig hilsen
Tarjei Huse
Mobil: 920 63 413