2009/5/22 EwanH <[email protected]>: > My spring is a bit rusty and I am struggling to find a way to get the bean > factory using scala inside a Lift app and yes once I get that then I can get > the template bean as you suggest.
I'm a tad confused too :) Maybe could you step back a little and describe how you're using Lift / Spring from an IoC perspective? Are you trying to get the ProducerTemplate from an object that is not dependency injected via Spring? e.g. from some class created by Lift? If so grabbing the Spring ApplicationContext (via the Spring web API) http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/web/context/support/WebApplicationContextUtils.html#getWebApplicationContext(javax.servlet.ServletContext) and then looking up the ProducerTemplate by ID is gonna be the easiest (adding the <template id="myId"/> element within <camelContext/> to export one into the spring application context) Otherwise, if you are trying to get the ProducerTemplate from an object created by Spring, just let spring inject it for you via the @Produces annotation. -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
