[jboss-user] [Javassist user questions] - Re: javassist.CannotCompileException: by java.lang.LinkageEr
arsami
do-not-reply at jboss.com
Fri Feb 8 15:57:33 EST 2008
Here is what I found about this issue:
1- there is a name for this on-the-fly change, it is called Class Reloading in Java
2- By default, Class Reloading is not supported by Java. However, you may use Java Platform Debugger Architecture (JPDA) to reload a class.
3- Javassist has a class for this, it's called HotSwapper
4- Another way to reload a class in runtime is to use a different ClassLoader instance. However, it is almost impossible to do this if your application is running in a Java Application Server or Web Server. You can simply mess with your server's internal ClassLoader.
----
By the way, the main reason for doing this was that I would like to be able to turn on/off logging and auditing of my Web application by method injection without needing to restart the server.
If any one knows a different approach, I will really appreciate if you could it share it.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127982#4127982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127982
More information about the jboss-user
mailing list