The only reason I know about the problem is because I had the same
situation, setting up variables.instance to a new Struct in my init()
method. None of my dependencies were being set and it drove me absolutely
crazy until I remembered the order that ColdSpring is doing things.

On 8/24/07, Sean Corfield <[EMAIL PROTECTED]> wrote:
>
> On 8/24/07, Brian Kotek <[EMAIL PROTECTED]> wrote:
> > That was exactly the problem to start with. ColdSpring runs the setters
> for
> > dependency injections BEFORE it runs the init() method. It does this to
> > resolve circular dependencies. So your bean factory WAS being set, it
> was
> > just getting deleted again when your init method ran.
>
> Ah, that was the piece of the puzzle I was missing looking at the
> ColdSpring code. Yes, of course, makes perfect sense. So it's not that
> you *have* init(), just what it *does*.
>
> I guess I've never run into this because I never initialize variables
> that I know ColdSpring will inject.
>
> Hmm, this might explain several other problems I've seen people having
> where they have an injected value that appears "unset" and I know they
> have an init() method that sets all of those variables to empty
> strings...
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>

Reply via email to