Jean, On 11/3/05, Jean Safar <[EMAIL PROTECTED]> wrote: > > I am experiencing a problem by which HiveMind (version 1.1 and 1.1-beta-3) > will enter into a infinite recursion when creating a service. This eventually > exhausts all the available memory and makes the program unusable. > > > I have a Service Class MyService implementing the interface IMyService. > > This class has a constructor public MyService (IMyService) {...} as well as > other constructors. >
If the constructor implementation doesn't call any methods on the IMyService parameter and the service's model isn't primitive (which it isn't in your case), then I reckon this kind of "self injection" should be fine. If however the constructor implementation calls a method on the IMyService parameter, then I can see how a loop like this could be entered. Can you confirm that your constructor implementation calls a method on the IMyService parameter? Thus a better solution than forbidding this style of "self injection" would be to make the BuilderFactory detect such loops. This should then also cover cases with more services involved. --knut --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]