On Thu, 12 Jun 2003, Igor Shabalov wrote:

> Date: Thu, 12 Jun 2003 11:13:47 -0700
> From: Igor Shabalov <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: Struts Action Scripting
>
>
> It's not about compilation time. It's about ability to reload code on-the
> fly. Here Eclipse do not helps you. Compilation time can be rather small.
> Time to reload all application will be unacceptable, I just need to reload
> one action.

Java does not provide any mechanism to unload a previously loaded class.
The best you can do is throw away the ClassLoader that loaded that class
(which is what containers like Tomcat do when you reload an existing app).

The fact that JSP pages can be recompiled only works because the container
goes to EXTREME lengths to load the class for each page in a separate
class loader -- but that doesn't work in the general case, because there
is no way to know what other classes might refer to a particular class.
The only safe answer is to reload the app as a whole.

You should give up on the hope of reloading an individual class, and
instead concentrate on techniques that reduce the reload time of your app
as a whole.  Of course, that's primarily an issue for developers, not your
production deployment, so it is probably not the most important thing to
spend your time on anyway.

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to