Brian is correct - init() is called right after the component is
created and setter methods are called after that (in no particular
order). Sounds like you are looking for "init-method" which allows you
to specify a method that coldspring will call on your component after
all the dependencies have been set.

On 5/25/06, Brian Kotek <[EMAIL PROTECTED]> wrote:
Tom, I belive the init() is called at the same time the component is
created. The setters are only called after that.

I believe that the beans are created in order of the dependencies
(obviously). If there are are no dependencies, they *might* be created in
the order defined in the XML but I wouldn't assume this or build anything
that relied on this. If a CFC has no dependencies, the order it is created
in shouldn't matter.

If you want to inject the logger into your other services, then that is a
dependency and the logger would be created first.

hope that helps,

Brian

On 5/25/06, Tom Chiverton <[EMAIL PROTECTED]> wrote:
>
> When is a beans init() method called ? After all the dependencies have
> been
> injected (setters called) ?
>
> Are dependencies injected in the order defined ?
> Are beans created in the order defined, unless they have a dependancy that
> isn't created yet (in which, case is creation deferred, or the dependants
> created?) ?
>
> I'm injecting a logger, and it would be nice to have the logger available
> as
> soon as possible - particularly when work is being done in the setters.
> --
> Tom Chiverton
>
> ****************************************************
>
> This email is sent for and on behalf of Halliwells LLP.
>
> Halliwells LLP is a limited liability partnership registered in England
> and Wales under registered number OC307980 whose registered office address
> is at St James's Court Brown Street Manchester M2 2JF.  A list of members
is
> available for inspection at the registered office. Any reference to a
> partner in relation to Halliwells LLP means a member of Halliwells LLP.
> Regulated by the Law Society.
>
> CONFIDENTIALITY
>
> This email is intended only for the use of the addressee named above and
> may be confidential or legally privileged.  If you are not the addressee
you
> must not read it and must not use any information contained in nor copy it
> nor inform any person other than Halliwells LLP or the addressee of its
> existence or contents.  If you have received this email in error please
> delete it and notify Halliwells LLP IT Department on 0870 365 8008.
>
> For more information about Halliwells LLP visit www.halliwells.com.
>
> We are pleased to announce that Halliwells LLP has been voted AIM Lawyer
> of the Year at the 2005 Growth Company Awards
>
>
>



Reply via email to