Skip to content

Instantly share code, notes, and snippets.

@jdewind
Created February 8, 2013 03:57
Show Gist options
  • Save jdewind/4736491 to your computer and use it in GitHub Desktop.
Save jdewind/4736491 to your computer and use it in GitHub Desktop.
private static void findInjector() {
EventListener[] eventListeners = context.getServletContext().getContextHandler().getEventListeners();
for (EventListener eventListener : eventListeners) {
if (eventListener instanceof ApplicationServletContextListener) {
injector = ((ApplicationServletContextListener) eventListener).backDoorToInjector();
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment