Results 1 to 3 of 3

Thread: Getting reference of factory bean in context file?

  1. #1
    Join Date
    Apr 2005
    Location
    Mumbai, India
    Posts
    9

    Default Getting reference of factory bean in context file?

    Is there a way to get the reference to a Factory bean from within the context file? I know there is programmtically a way by prepending '&' to the bean name, but I want to refer to a factory bean from within my bean context definition file.

    Any help would be appreciated.

    Thanks,
    -Nilesh

  2. #2
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default

    It's the same as programatically - precede the bean id with &
    However, because it's xml, you have to use an entity: &

    so:
    <ref bean="&amp;myFactoryBean"/>

    HTH
    Chris Harris
    Carlisle, UK

  3. #3
    Join Date
    Apr 2005
    Location
    Mumbai, India
    Posts
    9

    Default

    Well that worked.

    Many Thanks,
    -Nilesh

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

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