public BaseInterceptor[] getInterceptors( int type )
{
if( hooksCache != null ) {
if( hooksCache[type] == null ) {
Container gContainer = getContextManager().getContainer();
Hooks gHooks = gContainer.getHooks();
if( this != gContainer ) {
hooksCache[type] = mergeHooks(gHooks.getModules(type),
getHooks().getModules(type));
} else {
hooksCache[type] = mergeHooks(gHooks.getModules(type), null);
}
}
return hooksCache[type];
}
// load the cache with all the hooks
Container globalIntContainer=getContextManager().getContainer();
Hooks globals=globalIntContainer.getHooks();
hooksCache=new BaseInterceptor[H_COUNT][];
for( int i=0; i<H_COUNT; i++ ) {
Hooks locals=null;
if( this != globalIntContainer ) {
hooksCache[i]=mergeHooks( globals.getModules(i),
getHooks().getModules(i));
} else {
hooksCache[i]=mergeHooks( globals.getModules(i), null);