Created
April 8, 2014 14:17
-
-
Save eeichinger/10131204 to your computer and use it in GitHub Desktop.
My favorite "use spring to instantiate but register as a static global singleton" solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service("blActivityStateManager") | |
public class ActivityStateManagerImpl implements ActivityStateManager { | |
private static ActivityStateManager ACTIVITY_STATE_MANAGER; | |
public static ActivityStateManager getStateManager() { | |
return ACTIVITY_STATE_MANAGER; | |
} | |
@PostConstruct | |
public void init() { | |
ACTIVITY_STATE_MANAGER = this; | |
} | |
.... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment