-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathModuleConfig.cfc
42 lines (33 loc) · 944 Bytes
/
ModuleConfig.cfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
component {
this.entryPoint = "leakDetector";
function configure(){
// SES Routes
routes = [
// Module Entry Point
{ pattern="/", handler="report", action="leaks" },
// Convention Route
{ pattern="/:handler/:action?" }
];
interceptors = [
{ class = '#modulemapping#.interceptors.creationListener' }
];
}
function onLoad() {
structNew()
.append(
wirebox
.getScope( 'singleton' )
.getSingletons()
)
.each( function( k, v ) {
wirebox.getInstance( 'leakAnalyzer@singleton-leak-detector' ).registerSingleton( k, v );
} );
}
function afterConfigurationLoad() {
// Force handler caching to be on so this module can detect leaks in your handlers
controller.setSetting( 'handlerCaching', true );
controller.getHandlerService().setHandlerCaching( true );
// Turn off singleton reload as well.
controller.getSetting( "Wirebox" ).singletonReload = false;
}
}