• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How does JavaRebel work with classloaders?

 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Java Rebel Support
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
JavaRebel Support
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic