Results 1 to 5 of 5

Thread: Autowiring support

  1. #1
    ta Guest

    Default Autowiring support

    Hello,
    Any plans to support autowiring in Spring IDE? For the moment, the plugin complains about the absence of constructor with no arguments when I use autowire="constructor" and define a single constructor with arguments.

  2. #2
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default Re: Autowiring support

    Quote Originally Posted by ta
    Any plans to support autowiring in Spring IDE?
    No. I have no clue how to implement autowiring without instantiating the beans. And instantiating a bean factory's whole object graph is not feasable from within a simple validator running in Eclipse. Normally you need a runtime environment or mocks to do so, e.g. a respository for JNDI lookups or a JDBC connection pool for a DataSource.

    Quote Originally Posted by ta
    For the moment, the plugin complains about the absence of constructor with no arguments when I use autowire="constructor" and define a single constructor with arguments.
    In this case the validator should skip the no-arguments-constructor check. Please open a ticket for this issue via http://springide.org/project/newticket

    Cheers,
    Torsten

  3. #3
    ta Guest

  4. #4
    Join Date
    Sep 2004
    Location
    Texas
    Posts
    155

    Default Re: Autowiring support

    Quote Originally Posted by Torsten Juergeleit
    No. I have no clue how to implement autowiring without instantiating the beans.
    Is supprting autowire-by-name possible? Naively, it seems that it would be a matter of using reflection to identify setters on a bean, and comparing those against the previously parsed bean ids.
    Corby

  5. #5
    Join Date
    Aug 2004
    Location
    Frankfurt/Main, Germany
    Posts
    253

    Default Re: Autowiring support

    Quote Originally Posted by cepage
    Is supprting autowire-by-name possible? Naively, it seems that it would be a matter of using reflection to identify setters on a bean, and comparing those against the previously parsed bean ids.
    Using reflection from within Eclipse is not an option. We can't do any classloading-stuff like Class.forname() because we're living in a limited classloader provided by Eclipse without any "real" runtime environment.

    IMHO our only option is to use JDT's AST instead of reflection (this is already done by the BeansConfigValidator). But this means re-implementing the Spring's auto-wiring stuff. Here I don't know how complex this would be.

    I have to investigate. But currently I have no spare time left.

    Any volunteers?

    Cheers,
    Torsten

Similar Threads

  1. Replies: 7
    Last Post: Feb 1st, 2007, 01:47 AM
  2. Announcement: Spring IDE WebFlow Support Preview Release 2
    By Christian Dupuis in forum Announcements
    Replies: 2
    Last Post: Sep 15th, 2006, 11:50 AM
  3. Replies: 2
    Last Post: Sep 7th, 2005, 07:10 AM
  4. DAO Support without EJB Support
    By aryjr in forum EJB
    Replies: 1
    Last Post: Jul 11th, 2005, 10:40 AM
  5. New Spring Support Forums are Live
    By Colin Sampaleanu in forum Announcements
    Replies: 17
    Last Post: May 22nd, 2005, 12:57 AM

Posting Permissions

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