Inherited description: This callback method is invoked by the %New() method to
provide notification that a new instance of an object is being created.
If this method returns an error then the object will not be created.
It is passed the arguments provided in the %New call.
When customizing this method, override the arguments with whatever variables and types you expect to receive from %New().
For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:
Method %OnNew(dob as %Date = "", name as %Name = "") as %Status
If instead of returning a %Status code this returns an oref and this oref is a subclass of the current
class then this oref will be the one returned to the caller of %New method.
This method is called to acquire a specific Named instance of a service. The service
instance may have been previously registered with the Context using RegisterNamedInstance.
First the Context object is called to attempt to acquire a previously registered instance. If
the instance is present and its class has not be re-compiled since it was registered, then the
registered instance is returned. Otherwise, the subclass implementation of CreateInstance is
called to acquire and register an instance.
Implement Get for the Calculated 'Instance' property
This method will ensure that, for all named instances registered with this class, a new
service will be instantiated and initialized the next time EnsureInstance is called.
This may be used after making changes which affect all keys registed from a class, rather
than just a single key (which could use the InvalidateInstances method).
Calling this method ensures that the next time EnsureInstance is called, a new service
will be instantiated and initialized. Call this method after changing settings that the
service caches in order to have the setting take effect.
This method provides control of debug mode. When in debug mode, the EnsureInstance
method will always force a CreateInstance. This is useful during the development of a service,
but adds overhead in production because the service instance is created and initialized on each