Created
July 10, 2014 18:53
-
-
Save jeanouii/6a28f5cddc30368cd2c8 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 void beforeInfoTreeBuilder(final BeforeAppInfoBuilderEvent event) { | |
| LOGGER.fine("Adding governance interceptor to application > " + event.getAppModule().getModuleId()); | |
| final List<EjbModule> ejbModules = event.getAppModule().getEjbModules(); | |
| for (EjbModule ejbModule : ejbModules) { | |
| final EjbJar ejbJar = ejbModule.getEjbJar(); | |
| ejbJar.addInterceptor(new Interceptor(GovernanceEnforcerInterceptor.class)); | |
| final AssemblyDescriptor assemblyDescriptor = ejbJar.getAssemblyDescriptor(); | |
| assemblyDescriptor.addInterceptorBinding(new InterceptorBinding("*", GovernanceEnforcerInterceptor.class.getName())); | |
| LOGGER.fine("Successfully added governance interceptor to ejb module > " + ejbModule.getModuleId()); | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment