-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Consider using javassist for proxy generation [SPR-5654] #10325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Marten Deinum commented There seem to be multiple requests (#7964, #9663) for adding javassist proxies to the spring framework instead of only cglib. Also in the forum there is some activity/questions regarding that support. Someone also implemented a working version (http://forum.springsource.org/showthread.php?t=77971) and provided it to the community. For users which use another framework already using javassist (like hibernate, seam) this would be a nice addition to the framework, that way they would only have to rely in 1 bytecode library instead of 2. |
Ricardo Tercero Lozano commented Cglib has side effects handling signed jars. See https://jira.jboss.org/browse/JBPAPP-2971 and due to activity on proyect, it can be considered dead. I added a vote on supporting javassist instead of cglib. |
Nikita Koksharov commented I suggest to use my patch for Javassist (3.12 and higher) support. If you don't want to wait of 3.1 release or patch Spring you could just copy (JavassistAopProxy.java, JavassistAopProxyFactory.java, JavassistApplicationContext.java) sources to your own project and use JavassistApplicationContext as spring application context. For example, if you use ContextLoaderListener in web.xml just add follow lines: <context-param> |
Chris Beams commented There have indeed been a number of requests within and without the team to either replace CGLIB or at least allow for alternatives such as javassist. We'll look at this during the 3.2 timeline. |
Nikita Koksharov commented New patch version added, use 0001-from-CGLIB-to-Javassist-migration.patch. |
Nikita Koksharov commented Use sources standalone-sources.zip to begin javassist usage without spring patching. Also you could send me feedback about how it works for you. |
Chris Beams commented Thanks Nikita. Will take a look when we get to handling this issue. |
Nikita Tovstoles commented hello, please don't ditch cglib altogether (leave an option to keep using it, or at least profile before making the switch). we're seeing considerable perf problems with javassist in current form: |
James Shaw commented FWIW, cglib 3.0 appears to have been released yesterday: http://sourceforge.net/projects/cglib/files/cglib3/3.0/ |
Chris Beams commented Interesting, James - thanks for the heads-up. Are you seeing a changelog anywhere? Looks like there's been some serious modification to support ASM 4, but beyond that I'm not sure what's included in the release. |
James Shaw commented Sorry, I couldn't find any more information than you have already. |
Eduardo Macarron commented Chris, James, all I could find is this: cglib now uses ASM4. Due to API incompatibilities in ASM4, we've bumped the cglib version number to 3.0. If you still need ASM3 or earlier, we recommend that you continue to use cglib 2.2.2. |
Will Hoover commented MAT shows memory leaks caused by org.springframework.cglib.proxy.Enhancer using 3.2.0.RELEASE. |
Chris Beams commented Will Hoover, do you see the same against 3.2.2.RELEASE? There have been recent changes in this area. /cc Phil Webb |
Juergen Hoeller commented CGLIB recently saw a 3.1 release, so it is at least somewhat active... We generally stick with our use of repackaged CGLIB, ASM and Objenesis variants for the time being. There are no concrete plans for a migration here. |
Chris Koch opened SPR-5654 and commented
cglib doesn't appear to be an active project anymore. It'd be nice if there was a way we could specify javassist as our bytecode instrumentation utility.
Affects: 2.5.6
Attachments:
Issue Links:
@Bean
method visibility39 votes, 42 watchers
The text was updated successfully, but these errors were encountered: