Created
August 16, 2012 16:23
-
-
Save gastaldi/3371441 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class BeanManagerExtension implements Extension { | |
| private static volatile BeanManager beanManager; | |
| public void init(@Observes AfterDeploymentValidation evt, BeanManager bm) { | |
| BeanManagerExtension.beanManager = bm; | |
| } | |
| public void destroy(@Observes Shutdown forgeShutdown) { | |
| BeanManagerExtension.beanManager = null; | |
| } | |
| public static BeanManager getBeanManager() { | |
| return beanManager; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment