Hi list!

I'm trying to make an interceptor the same way as HM's LoggingInterceptorFactory, but I have some problems with the following code:

private void createInfrastructure(InterceptorStack stack, ClassFab classFab){ Class topClass = ClassFabUtils.getInstanceClass(stack.peek(), stack.getServiceInterface());
        classFab.addField("_delegate", topClass);
classFab.addConstructor(new Class[]{ topClass }, null, "{_delegate = $1;}");
}


the debugger tells me topClass is: Class ($PooledProxy_1040f7af339_32) which is the pooled instance of my real underlying class.

The function fails at line two, with this message:

Unable to process content of element construct/service: Unable to lookup $PooledProxy_1040f7af339_32: $PooledProxy_1040f7af339_32 (DefaultErrorHandler.java:37)

I guess that this is beacuse topClass is no real class - but a dynamic one - but the same should be true for the LoggingInterceptor - so I cannot understand why this is a problem for my class ??



--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to