|
From: Jozsa K. <dy...@on...> - 2004-04-28 15:14:59
|
On Thu, Apr 29, 2004 at 12:42:58AM +1000, Mike Cannon-Brookes wrote:
> Hey guys,
>
> Just wondering how you get around this scenario.
>
> We were playing around with autowiring today, specifically using the
> ListableBeanFactory.autowire(Class,
> AutowiringBeanFactory.AUTOWIRE_CONSTRUCTOR, false) method.
>
> Now the problem is that if I have two beans of effectively the same
> type (say SpaceManager) - the autowiring no longer works.
>
> The reason we have two beans implementing SpaceManager interface is
> that there's an implementation defined with all it's properties
> ('spaceManagerTarget') and then a transaction proxy factory bean
> wrapping the impl with transaction attributes ('spaceManager'). I think
> this is a fairly standard type of scenario.
>
> However both are exposing the SpaceManager interface, hence the auto
> wiring fails.
>
> What to do? Has anyone else faced this problem?
>
> I never access the 'spaceManagerTarget' from within my application, is
> it possible to 'hide' this instance somehow?
Mike,
cant you use autoproxy for your AOP scenario?
dyn
--
.Digital.Yearning.for.Networked.Assassination.and.Xenocide
|