Knut Wannheden wrote:
David,
On 5/25/05, David J. M. Karlsen <[EMAIL PROTECTED]> wrote:
Knut Wannheden wrote:
David,
The problem is a class loader issue. You're creating your own
ClassFactory instance, which in turn uses its own Javassist ClassPool,
which can't find the PooledProxy class HiveMind created using its own
ClassPool. You'll have to use HiveMind's ClassFactory.
For this you should define a setFactory(ClassFactory) method on your
interceptor factory and then add a line like this to the <construct>
of your interceptor factory service:
<set-service property="factory" service-id="hivemind.ClassFactory"/>
Cool - now it nearly works. But I'm using a finally block with classfab
- and this doesn't seem to be supported:
This is a limitation in Javassist. I think it's been fixed in version
3.0. So you could either try to use HiveMind 1.1 (your interceptor
factory needs to be slightly changed for this) or you could try to
work without finally; i.e. try working with try { ... } catch(...) {
... }.
Hmm, HM1.1 is still beta stuff - and I need a very stable
production-ready API. How many more betas?
So I went for the try/catch, but I still get a source-error - "no return
statement". BodyBuilder toString():
{
com.jamonapi.Monitor mon =
com.jamonapi.MonitorFactory.start("sendAndReceive");
try {
Object result = _delegate.sendAndReceive($$);
mon.stop();
return ($r) result;
}
catch (Throwable t){
if (mon!=null) mon.stop();
throw t;
};
}
--
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]