Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IConfigurableListableObjectFactory.PreInstantiateSingletons Method

Ensure that all non-lazy-init singletons are instantiated, also considering IFactoryObjects.

[Visual Basic]
Public Sub PreInstantiateSingletons()
void PreInstantiateSingletons();


Typically invoked at the end of factory setup, if desired.

As this is a startup method, it should destroy already created singletons if it fails, to avoid dangling resources. In other words, after invocation of that method, either all or no singletons at all should be instantiated.


Exception Type Condition
ObjectsException If one of the singleton objects could not be created.

See Also

IConfigurableListableObjectFactory Interface | Spring.Objects.Factory.Config Namespace