tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@eng.sun.com
Subject Re: Servlet reloading?
Date Sat, 12 Feb 2000 14:58:25 GMT
> 
> It's not explicitly stated in the spec, but I think you may be right ...
> this would be a natural consequence of "the container must avoid class
> cast exceptions".   However, that's not good news when you want to store
> something like a JDBC connection pool (which is generally not going to be
> Serializable because it's got a reference to a socket in it) in the
> servlet context attributes.  Yuck.

You can ( and many people do ) store JDBC connections in the session...
Or other "expensive" objects they don't want to create for each
invocation. Most are not serializable....

Again - for development we should do the most we can, and not worry about 
determinism. 

> I suppose you could impose a restriction that context attributes must be
> loaded by the system class loader (to avoid class cast problems), and not
> reload them.  But there's no way for the container to enforce this, since
> it depends on the sysadmin configuring things correctly.

Hard - all classes from WEB-INF are loaded by servlet loader.

Too much talking about that - if somebody has time to cut&paste Jon's
code, please do it - if we agree that it's "development only" it can't be
so bad. 
We can also try to use some flag to discard all object or try the 
 serialization trick, but that's up to whoever writes the code.

Costin


Mime
View raw message