This content has been marked as final.
Show 2 replies
-
1. 3830409
starksm64 Nov 30, 2004 5:30 PM (in response to mmoore)"cooper" wrote:
I am a big fan of Intellij IDEA and the command line :>sh build.sh clean >sh build.sh deploy >etc...
bah - chmod 700 on build.sh and add an alias :) -
2. Re: JCA in JB4/AOP
mmoore Nov 30, 2004 5:30 PM (in response to mmoore)You don't want to use finalize() it isn't guaranteed to be called and even if does get
called, it wrecks gc performance.
A real solution would be to do caller side analysis/weaving:
i.e.
POJOResource pr = new POJOResource;
pr.doSomething();
becomes (pseudo code)
POJOResource pr = POJOResourceManager.get();
try
{
pr.doSomething();
}
finally
{
POJOResourceManager.release(pr);
}
But this requires a fair bit of analysis of the bytecode.
A simpler solution would be to assume the resource has a close() method
and that it is called by the client. You would just identify the close operation
in the metadata.
The handles are just "proxies".
Regards,
Adrian