Add support for Spring FactoryBeans
-----------------------------------

         Key: SPRING-135
         URL: http://jira.andromda.org/browse/SPRING-135
     Project: Spring Cartridge
        Type: Improvement
    Versions: 3.2-RC1    
    Reporter: Peter Friese
 Assigned to: Peter Friese 
     Fix For: 3.2-RC1


Usually when you model a dependency on a service, the Spring cartridge creates 
a setter on the dependant service that receives an instance of the target 
service. This works out fine as long as the target service is a normal Spring 
bean. There is, however, something called "FactoryBean" in Spring - see 
http://www.springframework.org/docs/api/org/springframework/beans/factory/FactoryBean.html.
 The Spring docs state that "A FactoryBean is defined in a bean style, but the 
object exposed for bean references is always the object that it creates." This 
results in type mismatches on the dependency setter.

I suggest to annotate the dependency in order to specify the "real" type of the 
reference. We could use a tagged value (e.g. @andromda.spring.reference.type).

For a bried discussion on this topic, see the forum: 
http://galaxy.andromda.org/forum/viewtopic.php?p=8062






-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

Reply via email to