|
From: Torsten J. <tor...@on...> - 2004-11-10 23:03:21
|
Andreas, this is another usecase of parent beans I wasn't aware of. With all the flexibility of Spring bean configuration it's very hard to develop a validator which supports all the allowed usecases without creating the entire bean factory :-( I'm not sure how to handle constructor arguments in parent beans correctly. If no bean class was specified or the bean is abstract then checking the constructor arguments could be skipped. But what if a bean class was specified for a non-abstract parent bean and (like in your case) the number of constructor arguments doesn't fit because the child bean's constructor arguments have to be added? Currently I don't see any other option than dropping validation of constructor arguments completely. Any thoughts? Cheers, Torsten On 08.11.2004, at 13:29, Andreas Senft wrote: > > Hi, > > I recently installed Spring-IDE 1.1.0 on eclipse 3.0.1 > and encountered a problem. > > Scenario: > > I have a class with a constructor which takes 3 > arguments. In my configuration I have a parent bean > (as template) which defines only the first argument. > The bean specifies the "class" attribute. > > Then I have a bean which refers the above bean as > parent and declares the other two constructor > arguments. > Spring-IDE complains in both beans that the class has > no constructor with 1 or 2 arguments, respectively. > > I would expect that the specifications for the "child" > bean should be merged with the specifications of the > parent bean. The parent bean should, however, not be > validated in this case. Note that the error on the > parent bean also occurs if the parent bean is > specified as "abstract". > > Overall, Spring-IDE is really fun to work with! > > Regards, > Andreas > > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier > anmelden: http://mail.yahoo.de > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Springide-eclip-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springide-eclip-developer > |