To all Model 2 contributors,
I've been following this discussion and want to echo appreciation to the
contributors. I had a couple of questions to add. They regard...
<much snipping>
> > Second, it seems in the way of performance it would slow things down. I
> > mean..one of the uses of this container/servlet stuff is that you should be
> > able to update classes without having to restart the server, right? So if
> > you do this, but the XML file is read in only once, is there some way to
> > re-read it each time you make a change? Do you provide a hook or something
> > so that you can tell the controller servlet to reload the XML file, or do
> > you do like an app server where you start a thread in the init method that
> > say every 1 minute checks if the time/date stamp has changed from the
> > previous time/date stamp..and if it has, reload it? I am curious if there
> > is actually a way that during the course of a day if on our site we find out
> > something is wrong, we do a code change..if we will ever be able to upload
> > the changes without shutting down our site..which basically kicks off all
> > the transactions going on at that moment..very bad!
> >
>
> When your servlet is reloaded, the init() method will get called on the new
> instance. If you are loading your config information there (the usual case),
it'll
> get reloaded again.
>
> You could write a background thread to watch for changes in the config file
itself,
> but it seems easier to me to just "touch" (the Unix command) the class file of
your
> servlet, and auto-reload takes care of everything else.
>
> Java has design limitations on how you can do class reloading that pretty much
> force a servlet container to throw away your entire app and reload it. Some
> (many?) servlet containers make some attempt to save your sessions if you are
> storing Serializable objects.
>
> On the other hand, on-the-fly changes to a production application would give
most
> sysadmins I know a heart attack :-). They tend to prefer controlled
shutdowns,
> installing new releases, and controlled startups.
</much snipping>
<snip>
> Agreed again. We are trying to give our framework the ability to reload
> some of it's parts in runtime. But reloading the action classes is not
> so easy to accomplish as classloader issues might arise. So we are
> thinking about providing a nice and easy way for app. manager to tell
> the users "app. will shutdown in one minute" so at least they can warn
> users in advance.
</snip>
It seems like there are two issues here: (1) modifying configuration
information on the fly; (2) adding, modifying or deleting controller classes.
The operability of an application with high availability requirements is
affected by both issues. Certainly there should be no problem with modifying
configuration information (e.g., a target jsp), but shutting down an application
during availability hours in our environment would have severe consequences.
The big question is: Is this model ready to support applications with strict
availability requirements? If the servlet itself is modified, then of course it
will be reloaded and all the sessions will go down the tubes. But what
will/should happen when one of the classes in its Hashtable is modified? Could
the servlet be told to reload its configuration and the relevant classes? Could
the servlet be told to load a single new class or reload a modified one? What
would be the problem with one of the servlets controller classes handling
configuration updates? ... ok, time. But what else?
Thanks again to all!
Mark (This is my first post. I hope I did it right.)
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets