Scoping mechanism in Spring is extensible. Spring provides feature for define your own scopes, or even redefine the existing scopes (although that last one would probably be considered bad practice – It is important that built-in singleton and prototype scopes) can not be overridden.

org.springframework.beans.factory.config.Scope needs to be implemented while integrating your own custom scope(s) into the Spring container. The interface is quite simple, with only two methods to get and remove an object from/to an underlying storage mechanism respectively.