Support singleton and prototype scope