cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Ough <alex.o...@sungard.com>
Subject Re: How to use @Inject
Date Mon, 31 Mar 2014 22:54:25 GMT
It seems like I wrote a wrong type in ComponentContext.
getComponent(RmapDao.class).
It should be ComponentContext.getComponent(DomainDao.class)

Thanks
Alex Ough


On Mon, Mar 31, 2014 at 5:53 PM, Alex Ough <alex.ough@sungard.com> wrote:

> All,
>
> I'm trying to change "ComponentContext.getComponent(RmapDao.class)" to
> using @Inject, but I can't get the Dao object even after adding a
> configuration file with below information.
>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:context="http://www.springframework.org/schema/context"
>        xmlns:aop="http://www.springframework.org/schema/aop"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>
> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>                       http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
>                       http://www.springframework.org/schema/context
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>                       >
>
>     <bean id="domainDaoImpl" class="com.cloud.domain.dao.DomainDaoImpl" />
>     <bean id="accountDaoImpl" class="com.cloud.user.dao.AccountDaoImpl" />
>     <bean id="userDaoImpl" class="com.cloud.user.dao.UserDaoImpl" />
>
> </beans>
>
> Can anyone show me what needs to be fixed?
> Thanks
> Alex Ough
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message