Ice's blog


'HotSwapping' using JVM

There was a discussion about this ability of the JVM to perform 'hotswaps', that deserved a closer look...

- This ability is natively provided by JVM in debug mode. Feature available since JDK 1.4.2 (Alex's favourite Java release :)) provided via the Java Debug Interface (

- Redefine (also known as "HotSwap") was added in 1.4.2:

This new feature encapsulates the ability to substitute modified code in a running application through the debugger APIs. For example, one can recompile a single class and replace the old instance with the new instance.

This change was made to address these issues:

* Tool (IDE) vendors want the ability to do fix-and-continue debugging. That is, while debugging, identify a problem, fix it, and continue debugging with fixed code.

* Organizations deploying long running servers wish to be able to fix bugs without taking down the server.

HotSwap adds functionality to the JavaTM Platform Debugger Architecture (JPDA) to allow a class to be updated while under the control of a debugger. The two central components of this functionality are RedefineClasses which replaces the class definitions and PopFrame which pops frames off the stack allowing a method which has been redefined to be re-executed.

In the reference implementation, this functionality is implemented at the Java Virtual Machine Debug Interface (JVMDI) layer and made available through the higher layers of JPDA - the Java Debug Wire Protocol (JDWP) and the Java Debug Interface (JDI).

Redefinition Functionality offered:

    JDI    VirtualMachine.redefineClasses(Map classToBytes)
    JDWP    RedefineClasses (Cmd 18) in VirtualMachine (CmdSet 1)
    JVMDI    RedefineClasses(jint classCount, JVMDI_class_definition *classDefs)

According to the above, HotSwap (on-the-fly class redefinition) can happen only in debug mode. I guess it can't be natively run in normal deployed mode, because I assume that Sun thinks that if the application is already running and deployed, them this hotswap support is not needed. Deployed version is a deployed one, no need to change it, unless you're currently developing it :).

So, the rule should be, if you're developing, always run your applications in debug mode to rip the benefits of JVMs hotswap (on-the-fly class redefinition).

Also, this hotswap can have a dark side, that is, can take up resources incrementaly while in this debugging session, that is, the old (already redefined classes) can be left there and take memory resources, so memory exceptions can take place, but from my experience, this does not occur very often (i have used WTP in this mode for 1 day, without having a single memory exception; assumed that the memory settings of the JVM are properly set). However, having a practice of ocasional restart in debug mode, is always a good idea :)

For the WTP context, to put it in a 'productive development mode', you'll need to make two changes:

- set reloadable="false" on your eclipse configured server, for your application context
- always use debug mode during development

* Interesting development* : HotSwapping with ANT (using Ant task):
- Defines a hotswap target for Ant that allows your build file to replace class definitions on a running JVM. ( - incubator project)

Hope this helps,

Online Universities

Posted by aaa on декември 14, 2009 at 01:24 PM GMT #

Some people may worry that go down or wear heels on the heel MBT negative health damage, mbt in fact, this worry is unnecessary. For example ballet dancers,ballet movements are numerous, mbt shoes but only five foot position, mbt günstig as five, each pin requires both feet completely out (ie, horizontal) to open. At this point, almost all of the body weight fell on the heel, mbt schuhe negative heel than to wear a larger force, but also to strenuous exercise. Even so, the ballet dancer's heel will not have to be compromised.

Posted by mbt on септември 15, 2011 at 06:12 AM GMT #

It's so tough to encounter right information on the blog. I realy loved reading this post. It has strengthen my faith more used inversion tables | ep 550 inversion table

Posted by rickyjake on ноември 08, 2011 at 09:41 AM GMT #

I appreciate your article very much. Thanks for sharing it. wedding gifts

Posted by elmarie on ноември 17, 2011 at 09:32 AM GMT #

Glad I've found this article. I'll share it to my friend. welding training

Posted by arnoldoh on ноември 17, 2011 at 09:34 AM GMT #

In weve talked Deerfield Beach Flooring prior several other Locksmiths Virginia Beach news fringe from Garage Door Northglenn an individuals entirety Locksmith Lewisville TX just naked for

Posted by polard85 on ноември 22, 2011 at 07:56 AM GMT #

Other than flaunting ghd australia, the reason behind this is to make the collections customer friendly. This applies the most when shipping has to be done and the type of GHD straighteners australia packaging is used to determine the packaging cost. High quality packaging of GHD hair straighteners australia, watches, earrings and other help protect them from getting dust or moisture from the environment

Posted by australia ugg boots on декември 12, 2011 at 05:23 AM GMT #

This is splendid to read about - and I am so happy that you shared it. God bless you and all that jazz! Cooking Training | Business Tips | Good Health Sources | Cheap Flights

Posted by Diet Solutions on декември 21, 2011 at 11:24 PM GMT #

These are one of the few posts that I actually care to comment on. I find this blogger an inspiration and is definitely worth following. I've became a subscriber too, so please keep me updated. teeter ep 550 sport inversion table | Sciatica Relief

Posted by Thelma Carter on март 16, 2012 at 01:07 AM GMT #

Thanks for taking the time to talk about this, I feel fervently about this and I take pleasure in learning about this topic. Please, as you gain information, please update this blog with more information. I have found it very useful.Strimedix | Dandruff

Posted by Freddie Husltin on март 16, 2012 at 01:28 AM GMT #

Thank you for taking the time to publish this information! I've been looking for books of this nature for a way too long. I'm just glad that I found yours

Posted by Fake Degree on мај 13, 2012 at 07:02 AM GMT #

Such information is very valuable especially that it shows a new way of performing hotswaps. JVM is great. sable hunting | Pacquiao vs Bradley Live Streaming | quality assurance certification

Posted by Eric Moran on мај 29, 2012 at 01:28 AM GMT #

I really don't understand much about this topic. Could you please elaborate more on this? Thanks in advance. wheel balancers | automotive lifts

Posted by normanbass on јули 20, 2012 at 05:38 AM GMT #

This really is a well worth a look of the article, very interesting. Write many people heart! Fake Diploma | Fake Degree

Posted by Diplomas on јули 21, 2012 at 06:22 AM GMT #

We are prepared Huntington Beach Locksmith provide all of Locksmiths DeSoto garage doors and Locksmith Annapolis necessities.We are within

Posted by jfsdfjsadkfvmdsf on јули 26, 2012 at 06:22 AM GMT #

Or perhaps not Coventry Locksmiths really want a Atlanta Locksmiths corporate and business Belleville Locksmiths for your office Locksmith Chelmsford element or high Locksmiths Houston warehouse flooring our Locksmiths Cranford office personnel will Bethesda Locksmiths for the spot Franklin Square Locksmith flooring option for Arlington Hts Locksmiths own personal requirements.Despite Locksmith Gardena whether you have La Mirada Locksmith need for a Locksmiths Denton example of current Annapolis Locksmith style for your Chelmsford Locksmith site or stable Locksmiths Cypress flooring our specialist Locksmiths Brentwood will explore the Locksmith Coppell flooring choice for Locksmiths Downers Grove is going to Essex Locksmiths otherwise you need Locksmith Baltimore get a elusive Billerica Locksmiths browse for your Arlington Heights Locksmith reception domain or Locksmiths Kansas City warehouse flooring our Glendale Locksmith working team will Locksmiths Kent the appropriately flooring Chandler Locksmiths to the problem Locksmiths Las Vegas your really needs.Sometimes Bellevue Locksmith you desire a Locksmith Compton corporation read for Locksmiths DeSoto wedding reception domain Hallandale Locksmiths long lived warehouse Carol Stream Locksmith our master office Broomfield Locksmiths will get hold Locksmiths Lake Worth the true flooring Edina Locksmith for your requests.Regardless Locksmiths Brandon its you have Joliet Locksmith smooth business enterprise Locksmiths Harrison corporate visual appeal Locksmith Lancaster your wedding reception Locksmiths Commack area or powerful Deerfield Beach Locksmith flooring our practitioner Buena Park Locksmiths will purchase the Locksmiths Alameda flooring product for Locksmiths Cupertino should.Or perhaps not Baltimore Locksmiths ought to have Locksmith El Monte elusive corporate headquarters Fremont Locksmiths a look for Locksmith Goodyear party part or Denver Locksmiths warehouse flooring our Locksmiths imperial beach person office members will appear the well flooring choice for your needs and wants.Irrespective of you be needing a clever corporation check for your phone coverage surface or high quality warehouse flooring our pro staff members will arrive the properly flooring fix for your will need. Regardless if you have a smooth commercial look and feel for your wedding celebration territory or hardy warehouse flooring our professionals sales team will see the well flooring cure for your prerequisites.This is you to possess a slippery company come across as for your wedding reception zone or adjustable warehouse flooring our knowledgeable staff member will come the suitable flooring cleaner for your must. Landed at your destination you should have a state-of-the-art example of current corporate headquarters see for your office reception element or solid warehouse flooring our certified office personnel will realise the exactly flooring fix for your has.Whether you need to a modern day company have a look for your wedding reception industry or prolonged lasting warehouse flooring our well trained workforce will throughout the best suited flooring liquid for your conditions.

Posted by jdsfierndskf on октомври 17, 2012 at 09:40 AM GMT #

Use only under the neck to the chest and abdomen between the feather, soft and high water, and thinner and lighter than the feather came. So, not only thin, light and more comfortable stretching activities. Do not believe, then, to find a vacuum beng compression, intuitive experience will be able to Moncler characteristics

Frances leading straight down garments brand name MonclerGrenoble, 2011 extended straight down coat for girls collection in lots of information mirror the particular snowboarding beginnings: sheepskin liners and also wide lace, create material Moncler Coats opaque feel, ribbed jumper Alpaca or perhaps laminated made of wool creation boost jumper or perhaps jumper inside Great britain type. Abundant and also multi-colored vivid shade, robust. Cozy shade layout motivated from the fragile, apparent old style ambiance: wine beverages reddish, strong yellowish and also greyish environmentally friendly.

2011moncler feminine funds straight down outerwear attire basics, built to become equally type and also engineering, imaginative attractiveness and also powerful com. Garments staying with the particular standard type  permeated together with the thought of MonclerGrenoble, as well as the modern day. Concurrently, the outer lining following your waterproofing therapy regarding Tweed Cloth in addition has recently been followed, thermoplastic snowboarding jeans and also part stretchy running snowboarding bundles are produced from this kind of substance. Moncler feminine funds straight down outerwear Hoodie to be able to place the pinnacle, level Moncler Outlet of resistance to be able to cool wind flow. Things may be piled and also along with cozy sporting natural cotton engineering, Moncler Sale released an original create sleeping pad substance. Moncler store feminine straight down although nonetheless making use of purple velvet, creatItaly straight down coat brand name (Moncler jackets) ThomBrowne collection of developers on the PiscinaCozzi Ground inside LuigiSecchi (the Memorial has been integrated 1934 and also has been rebuilt previous year), provides arranged a particular displays, best manifestation regarding year summer season sports-themed spring/summer 10 new services. elizabeth powerful clothes.

Posted by Moncler Outlet on декември 08, 2012 at 08:13 AM GMT #

I am really appreciative to the writer of this post for doing this fair and informatory article here for us. We really appreciate ur attempt. Keep up the charming process...

Posted by California lawyers bankruptcy on јануари 25, 2013 at 10:01 AM GMT #

Thanks for sharing the information. I found the information very helpful. That's a awesome article you posted

Posted by mosaic medallion on февруари 06, 2013 at 06:36 AM GMT #

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me.

Posted by African Artefacts on февруари 12, 2013 at 03:59 PM GMT #

I am really appreciative to the writer of this post

Posted by carbon wheelset on јули 22, 2013 at 09:30 AM GMT #

Post a Comment:
  • HTML Syntax: Allowed

« април 2014

Valid XHTML or CSS?

[This is a Roller site]
Theme by Rowell Sotto.
© ipenov