Results 1 to 2 of 2

Thread: Prototype Bean with ref to Singleton?

  1. #1
    Join Date
    Jan 2006
    Posts
    12

    Default Prototype Bean with ref to Singleton?

    I have a prototype bean that contains a reference to a singleton bean. The setter for the dependent property is not being called.

    <bean id="loginScreen" class="package.LoginScreen" init-method="init" singleton="false">
    <property name="authenticationService">
    <ref bean="authenticationService"/>
    </property>
    </bean>

    If i define the bean with singleton="true" the setter gets called...

    Is what i am trying to do possible?

    -jm

  2. #2
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default

    How is loginScreen referenced? In other words, where are you triggering the instantiation of loginScreen?
    --Jing Xue

Posting Permissions

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