Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does JavaRebel work with classloaders?

 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's consider we have J2EE application deployed in an application server. Application servers provide a way to configure classloaders for your application. This way, the classes within your application will be loaded by your application classloader. Now let's assume one of the classes in this application changes.

How does JavaRebel load this changed class? More specifically, which classloader will JavaRebel use to load this class?
 
Jevgeni Kabanov
Java Rebel Support
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRebel neither introduces new classloader nor changes the classloader hierarchy in any other way. The classes will be loaded in the same classloader as usual (including changed ones).
[ August 12, 2008: Message edited by: Jevgeni Kabanov ]
 
Toomas Römer
JavaRebel Support
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaikiran,

Depends on your application's classloader. If there is a lot of magic you might need to make minor changes but most custom classloaders work out-of-the-box.

Basically JavaRebel integrates with all the classloaders in the application server applying our generic integration (if not specified differently by our integration). This will happen automatically if your own classloader is a derivative of URLClassLoader.

Our integration is released as open-source. For example to see what exactly we do for the generic integration see the generic installation source files.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jevgeni and Toomas

Updating class files on the fly without redeploying the entire application is one of the most frequently asked question in the application server forums. I will see how the trial version of this tool works out with JBoss.

Our integration is released as open-source. For example to see what exactly we do for the generic integration see the generic installation source files.


Great!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic