|
From: Mike Cannon-B. <mi...@at...> - 2004-04-28 14:43:25
|
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?
Cheers,
Mike
--
ATLASSIAN - http://www.atlassian.com/
Confluence - the professional J2EE wiki - tried it yet?
http://www.atlassian.com/confluence/
|