Re: Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-17 Thread Bruce McGuire
Hi James. It turns out that I had 'userDAO' in one spot, and 'UserDAO' in another. Problem solved. Thanks, Bruce. James Carman wrote: Did you mark UserDAOHibernate with the @Repository annotation? 2009/6/16 Bruce McGuire : Hi Vasu. Thanks for the info. Now I get it, and have successfu

Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-17 Thread James Carman
Did you mark UserDAOHibernate with the @Repository annotation? 2009/6/16 Bruce McGuire : > Hi Vasu. > > Thanks for the info. Now I get it, and have successfully wired my demo app > so that it does the job. > > Although I did notice that along with the context:component-scan I did need > to define

Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire
Hi Vasu. Thanks for the info. Now I get it, and have successfully wired my demo app so that it does the job. Although I did notice that along with the context:component-scan I did need to define the beans that I was going to autowire. How did you get around this? class="com.coastwar

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Vasu Srinivasan
Using annotations, I have only one line in the spring's applicationContext.xml -- Services are tagged with @Service, Daos are tagged with @Component("xxxDaoImpl"), Wicket web pages have @SpringBean (name="") Within the ServiceImpl, the Daos are tagged with @Autowired. No other xml config, sett

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread James Carman
You are correct. You should only use @SpringBean in your wicket-related code (components/pages). Let Spring wire the rest together, however you want to configure it to do that (with annotations or xml). You can use @Autowired to inject your DAOs into your Services. You just have to make sure yo

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire
Hello James. So I have completely missed the point of the Repository, Service and SpringBean annotations? I was under the impression that the idea was to avoid using a lot of xml in my context files. If I am understanding correctly, what you and Martijn are saying is the following: Tag the