Am Sonntag, 15. Juni 2008 15:57:10 schrieb Jeremy Thomerson:
> It's a chicken and egg problem - you're wiring up your use case class
> through spring config. Since it's not done loading, you can't use it to
> inject things during the constructor of your spring-configured usecase
> class.
>
> I'd suggest just using Spring config to inject the DAOs into your usecase
> class.
Hi Jeremy
it would be cool if it would be that simple. But if i inject the "sub" beans
in my usecase i get only NullPointerException while accessing them.
i've added
<!-- setup my usecases -->
<bean id="myUC" class="org.coresd.tipchamp.usecase.BetUsecases">
<property name="trendBehavior"><ref
bean="trendBehavior"></ref></property>
<property name="gameDao"><ref bean="gameDao"></ref></property>
<property name="backerDao"><ref
bean="backerDao"></ref></property>
<property name="betDao"><ref bean="betDao"></ref></property>
</bean>
the private transient GameDao _gameDao;
...
and appropriate getter and setter to MyUsecase.
You have a suggestion for me?
Thank you
Per
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]