Results 1 to 3 of 3

Thread: Does Spring AS support method injection in XML configurations?

  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Question Does Spring AS support method injection in XML configurations?

    The situation is, I want have a prototype scoped object referenced by a singleton object. In spring, I can do like this:

    Java code:

    SingletonObject.java
    Code:
    public class SingletonObject {
    
        public PrototypeObject getPrototypeScopedObject() {
        }
    
    }
    PrototypeObject.java
    Code:
    public class PrototypeObject {
    
    }
    application-context.xml
    Code:
    <bean class="SingletonObject" scope="singleton">
        <lookup-method name="getPrototypeScopedObject">
            <bean class="PrototypeObject" scope="prototype" />
        </lookup-method>
    </bean>
    so, everytime when I call getPrototypeScopedObject() method in instances of SingletonObject, I'll get a new instance of spring-managed PrototypeObject.

    I don't know this feature or some way alternative is implemented by spring actionscript, so please anyone could help me to solve this problem - using a spring-managed prototype object in a singleton object.

    Thanks a lot.

  2. #2
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    160

    Default

    HI,

    this is not supported. Please file a feature request at our Jira.

    On a sidenote: I'm not sure if this is something you can do in ActionScript 3. As far as I understand, you would need to change the implementation of the lookup method dynamically. So I'm thinking we would need some bytecode lib to achieve this.

    Do you have any info on how Spring does this? Does it use ASM?

    - Christophe
    Christophe Herreman
    Spring ActionScript Founder
    http://www.herrodius.com

  3. #3
    Join Date
    Mar 2009
    Posts
    2

    Default

    I think it'll be wonderful that spring AS will be intend to implement this feature.

    Thanks I lot, and forward to hearing the publish of Spring AS 0.1.0~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •