|
From: <jue...@we...> - 2003-11-10 23:02:21
|
I've been asked that by co-workers too. In all our cases, we managed to = solve the issue by redesigning the application objects so that such = side-effects that other beans depend on are avoided. Nevertheless, I've = repeatedly considered adding Ant-style "depends" support, possibly via a = "depends-on" attribute of the "bean" tag, with a comma-separated list of = bean names as value. =20 On bean creation, the bean factory would simply have to call getBean for = those bean names first, before actually creating the bean instance. That = would be easy enough to add (compared to constructor resolution or such = stuff), so I might do this alongside breakfast tomorrow ;-) Are there = any objections to such an option? If not, I suggest to add this already = for 1.0 M3. =20 Juergen ________________________________ Von: spr...@li... im Auftrag = von Colin Sampaleanu Gesendet: Mo 10.11.2003 23:26 An: spr...@li... Betreff: [[W3-SPAM]] - [Springframework-developer] Forcing dependencies = between singleton beans without one actually being a property of another = - Email found in subject I had a co-worker ask me if there was a way to force the creation/usage of a singleton bean B to first create another bean, A, without A actually needing to be a property of B. He needs this because A has some side-effects which B depends on, to work properly. Of course there are some artificial ways to cause this to happen, but I can't think of anything too clean. Is this worth adding as a built-in capability? ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |