Sorry for broken links. Shouldn't have used line wrapping in my mail client.
Project write-up: https://gist.github.com/dteleguin/c93fe4a4c666234729d8 StackOverflow thread: http://stackoverflow.com/questions/36239250/injecting-java-ee-resources-into-dynamically-loaded-classes
