Announcement Announcement Module
No announcement yet.
Does Spring AS support method injection in XML configurations? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    public class SingletonObject {
        public PrototypeObject getPrototypeScopedObject() {
    public class PrototypeObject {
    <bean class="SingletonObject" scope="singleton">
        <lookup-method name="getPrototypeScopedObject">
            <bean class="PrototypeObject" scope="prototype" />
    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

    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


    • #3
      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~