|
From: Chris N. <ch...@si...> - 2003-11-25 22:28:00
|
Chris Nokleberg wrote: > The original plan was for CGLIB 1.0 and 2.0 to be able to coexist > peacefully. This was enabled by moving all of the net.sf.cglib.* classes > into a new package (net.sf.cglib.proxy). However, we recently switched > CGLIB 2.0 to use ASM 1.4, which is *not* binary compatible with ASM 1.3 > (which CGLIB 1.0 uses). This means that you can no longer use CGLIB 1.0 > and 2.0 in the same environment. Actually there are two possibilities, if you need to support Hibernate 2.0 and 2.1 simultaneously, or just want to use CGLIB 1.0 for AOP but CGLIB 2.0 for Hib2.1: a) Use the BCEL version of CGLIB 1.0. This adds an extra 350K, is slower to generate classes, and has some thread safety issues. Also, many other projects use BCEL so you are bound to run into some version conflicts here anyway. b) Fork the CGLIB 1.0 and ASM 1.3 sources, repackage ASM (e.g. "org.springframework.asm") and change the CGLIB source to use the forked package. It's easier than it sounds, but I'd still avoid it if possible. Chris |