jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naveen Kuppili" <nav...@flexetech.com>
Subject RE: Redefining a class on the fly -
Date Wed, 27 Aug 2003 23:10:38 GMT
This is the scenario - I would like to instrument a code on the fly
using custom classloaders. But, if performance degrades to a certain
point, I would like to get rid of the changes and in essence "rollback"
the changes.

I am just doing a feasibility study of such an approach at this point.
Any ideas on how this could be accomplished would be very much
appreciated.

Thanks,
Naveen
Flexetech Solutions, Inc.
http://www.flexetech.com

-----Original Message-----
From: Bob Lee [mailto:crazybob@crazybob.org] 
Sent: Wednesday, August 27, 2003 5:03 PM
To: BCEL Users List
Subject: Re: Redefining a class on the fly -


What problem are you trying to solve?

Bob

On Wednesday, August 27, 2003, at 02:45 PM, Naveen Kuppili wrote:

> From what I understand it, this would require the VMs to run in remote
> debug mode. This is a good start - but, I was looking more for 
> something
> that could do in a real production environment.
>
> Is there a way to trick the VM into forcing a class to be garbage
> collected, and re-initiate it? Would it be possible to force a GC of a
> class while there are still objects instantiated from it? It kinda 
> seems
> impossible to me - but just wanted to air the idea for comments.
>
> Thanks,
> Naveen
> Flexetech Solutions, Inc.
> http://www.flexetech.com
>
> -----Original Message-----
> From: Bob Lee [mailto:crazybob@crazybob.org]
> Sent: Wednesday, August 27, 2003 3:33 PM
> To: BCEL Users List
> Subject: Re: Redefining a class on the fly -
>
>
> Sure, using the JPDA. Actually, Daniel Savarese wrote an article
> describing your exact case:
>
> http://www.ftponline.com/javapro/2002_09/magazine/columns/proshop/
>
> Bob
>
> On Wednesday, August 27, 2003, at 01:44 PM, Naveen Kuppili wrote:
>
>> All,
>>
>> Is there a way to redefine a class on the fly? I know that we could
>> have
>> custom classloaders that could potentially modify byte code on the
fly
>> while loading a class. But, would it be possible to dynamically
unload
>> the class and redefine it? I want to have a way of "rolling back" my
>> changes that have been done to a class.
>>
>> Any thoughts on this?
>>
>> Thanks,
>> Naveen
>> Flexetech Solutions, Inc.
>> http://www.flexetech.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: bcel-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message