You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Hans Bergsten <ha...@gefionsoftware.com> on 1999/07/08 20:24:44 UTC

Class loaders [Was: Re: Java1.1 or Java2?]

James Duncan Davidson wrote:
> [...]
> > But how about the issue I raised? Have you been able to handle class reloading
> > in a way that's acceptable with JDK 1.1? Or is your opinion that since it's a
> > reference implementation it's okay to reload all or nothing?
> 
> Yes, we've had custom class loaders written for 1.1 that did some of the
> right things in the past. The only reason that JSDK/WDK doesn't
> currently do reloading is, under 1.1 (and under 1.2, don't kid
> yourself), that do obey the spec here wrt making sure all the classes
> are in the same namespace, when a class changes, the entire context
> should be recycled. It's not too much of a pain in the ass, but we
> hadn't gotten there yet.

I know it can be done if the entire context is recycled, but that's the
"all or nothing" approach I'm afraid will cause problems. It may be okay
if only servlets are recycled, and auto-reload of Beans is not supported (you 
would loose state in session and application Beans if you did). But even if 
it's just servlets, it sounds like a pretty time consuming and distrupting 
operation for a semi-large JSP based applications.

> I'm going to find our reloading code and get it back into the workspace
> so that it's there and commented up with what needs to happen.

Great, I'll look at that, and the GNUJSP approach as Mario suggested.
If I'm the only one who's concerned about this I guess I better do my
homework and come back with stronger arguments if needed later ;-)

Don't get me wrong. In general I think the best approach is to stick to
JDK 1.1 for now. It's just that I believe some things, like this, will be 
pretty much impossible to do in an acceptable way with 1.1 and we should
be open to use 1.2 where it's needed. This may be in line with what Craig
suggested, only that 1.2 may not only be needed for "enhanced" features but 
also for core pieces.

-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Re: Class loaders [Was: Re: Java1.1 or Java2?]

Posted by James Duncan Davidson <du...@x180.com>.
Hans Bergsten wrote:
> I know it can be done if the entire context is recycled, but that's the
> "all or nothing" approach I'm afraid will cause problems. It may be okay
> if only servlets are recycled, and auto-reload of Beans is not supported (you
> would loose state in session and application Beans if you did). But even if
> it's just servlets, it sounds like a pretty time consuming and distrupting
> operation for a semi-large JSP based applications.

If the purpose is for development, it won't take too long. I modeled a
system that dumped out a boat load of classes and reloaded, didn't take
more than a 1/10 of a second. If you've got reloading turned on in a dev
system, then you've got problems.

Also, remember what I said about josper not forcing class reloads for
jsp edits -- it just munges class names.

> Don't get me wrong. In general I think the best approach is to stick to
> JDK 1.1 for now. It's just that I believe some things, like this, will be
> pretty much impossible to do in an acceptable way with 1.1 and we should
> be open to use 1.2 where it's needed. This may be in line with what Craig
> suggested, only that 1.2 may not only be needed for "enhanced" features but
> also for core pieces.

Yeah, it's going to be interesting. 

-- 
James Davidson       
<du...@eng.sun.com>            http://java.sun.com/products/servlet
<du...@x180.com>                                http://www.x180.com
!try; do()                                            PGP:0x7D776205