ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <>
Subject RE: [PROPOSAL] 'redefine' task that uses JDK 1.4/JPDA class redefinition
Date Sun, 03 Feb 2002 23:05:35 GMT

I like your idea. However, I don't see what benefit it will bring for
server side development as all (or almost all) existing containers
already support dynamic reloading. For example, to run my Cactus tests,
I do no start and stop the application server but simply drop the new
WAR (or EAR) over the existing one. Am I missing something ?

Or do you want to externalize the dynamic reloading feature (in an Ant
task) so that containers or other type of code that do not already have
this feature can still benefit from it, i.e. generalize it by taking it
outside of the code base ? This is probably what JPDA of JDK 1.4 is
about : have this feature built into the JVM instead of in the code ...

On a slightly different subject I am very interested by JPDA to provide
easy interception mechanisms for in-container testing with Cactus (to
provide hook-points in the container instead of having to provide
explicit redirectors at application package time), thus making the test
process transparent from the point of view of the application (in other
words, no modification whatsoever to the WAR/EAR, only runtime
modification to loaded classes during the tests).


> -----Original Message-----
> From: [] On Behalf
> Kevin A. Burton
> Sent: 03 February 2002 21:46
> To:
> Subject: [PROPOSAL] 'redefine' task that uses JDK 1.4/JPDA class
> redefinition
> Hash: SHA1
> OK.
> Has anyone read about the JPDA 1.4 enhancements that have made it into
> 1.4:
> I am specifically talking about class redefinition.  AKA the ability
> recompile and update classes within a running JVM.
> This is done through JPDA and should support any application that runs
> within
> JDK 1.4.
> Some applications like Tomcat have class reloading built into them.
> is
> primarily due to the fact that Java has not been able to redefine
> at
> runtime.
> What I want to do is build a new ant task named 'redefine' that takes
> directory of .class files, compares it to a directory of deployed
> files
> (if available) and redefines them.
> So for example one could:
> <redefine host="localhost" port="2112">
>     <new-classes>
>         <fileset dir="../bin/classes" includes="**/*.class"/>
>     </new-classes>
> </redefine>
> This would connect to localhost:2112 with JPDA and redefine every
> under
> ../bin/classes.
> This isn't as easy as it sounds... there are some issues.
> Specifically if you have singleton classes, these will not be
> In
> order to do this you have to pop entries off the stack before this
> was
> used.
> Obviously in a lot of situations this is not desirable.  We should
> the
> ability to enable/disable this via pop-frames="false|true" (should be
> false by
> default)
> This should provide a significant increase in functionality for both
> server
> applications and developers.
> Developers could have compile, redefine, and test (with cactus or RPC
> style
> code) within seconds without having to wait for their ENTIRE
> reload.  Application server admins will be able to redefine necessary
> without having to restart their application (think availability).
> Thought?
> I think this is a good idea.  Of course I will contribute this to
> if it
> is requested.
> The only other drawback is that this will require JDK 1.4 to compile.
> might
> be a good idea to put this under a CONTRIB directory.
> Kevin
> - --
> Kevin A. Burton (,,
> )
>              Location - San Francisco, CA, Cell - 415.595.9965
>         Jabber -,  Web -
> Windows is easy to learn and hard to use, while *nix is hard to learn
> easy
> to use.
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Get my public key at:
> iD8DBQE8Xa+YAwM6xb2dfE0RAkzYAKC/dLJws35YStdaVHTCdmnRGT92pgCeJaG6
> 260llFeSASt3UjOIPrhk4z8=
> =j4+F
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message