Yeah, these are important questions. I don't have a definitive, all
encompassing answer for you, but I can make a couple of comments.
JRun has the ability for hosting services to offer a fine grained approach,
where they can setup a servlet/jsp container for each individual domain
customer. JRun also allows the hosting service to offer an admin, web based
interface to
each individual container. So if you're with a hosting service that is using
a JSP engine with these features, you would have the ability to restart your
own individual container (which may include 1 or more web applications)
without affecting the servlet containers of other domains being hosted by
the hosting service.
Also, the norm is to have a dev environment setup on your personal machine
or, for a company, on your LAN. You do all you changes and testing there,
along with the multiple server restarts. After you've got it all working
properly, you upload your new files to your hosting service's server and
restart the servlet container just once.
I think this is a big issue though. It is a genuine hassle to have to frig
around with restarting your server even during development; particularly if
you have a team of developers on a project. And even
restarting your live server once a day, week, or month because of minor
changes could be a potential (but not insurmountable) problem.
Here's some questions I'd like to put to the group as a whole:
1. Does anyone know of a JSP/servlet engine provider who's product has the
ability to detect changed support classes/beans and reload them dynamically
(that is, without starting the web server)? Or, is there a way of eliciting
this behaviour from current products that we're overlooking?
2. Does anyone have any thoughts on whether this behaviour would actually be
implementable by a vendor? Does anyone think that this behaviour would
actually be undesirable? If there are issues that would make it difficult
(one thing I can think of is that due to ongoing references to instances of
the class in question
(from the session or application attributes lists, for example) that this
may make reloading of the class a problem; does anyone have thoughts on
that?), is there are way that the behaviour could be flagged to be turned on
in the dev environment but turned off in the live environment? At least the
multiple dev server restarts could be avoided.
3. I'm not too familiar with EJB's and the characteristics of EJB
containers. Are beans deployed within EJB containers a bit more flexible?
Can recompiled classes be easily redeployed (like simply recompiled into an
EJB folder) then dynamically detected and reloaded by the EJB container?
Note that we're NOT talking about the ability to dynamically reload changed
JSP's or servlets. We're talking about the ability to dynamically reload
changed support beans/classes.
Looking forward to the feedback.
Rob
----- Original Message -----
From: "cupid1" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 22, 2001 8:50 AM
Subject: Re: problem with javaBean and jsp
> If we have to shutdown and restart the application server every time we
> change our bean or .class files, how could it be done if there are other
> applications running and being used on that server. Secondly, how could we
> ask a host company to shutdown and restart their server because we
modified
> one of our .class file, in case we are not in house host?.
>
>
> ----- Original Message -----
> From: "Nishit Trivedi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, March 22, 2001 9:54 AM
> Subject: Re: problem with javaBean and jsp
>
>
> > it a tomcat behaviour too...i am using tomcat 3.2.1
> >
> > Nishit
> >
> > -----Original Message-----
> > From: cupid1 [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 21, 2001 11:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: problem with javaBean and jsp
> >
> >
> > It makes sense now. thanks. Is this only the jws behavior or tomcat's
too?
> >
> > ----- Original Message -----
> > From: "Rob L'Estrange" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 22, 2001 4:34 PM
> > Subject: Re: problem with javaBean and jsp
> >
> >
> > > Good news! :)
> > >
> > > Here's the usual story that explains the problem.
> > >
> > > 1. The developer creates and compiles a Bean or class with limited
> > > functionality.
> > > 2. The developer creates a JSP page that uses the Bean.
> > > 3. Satisfied with no errors in step 2, the developer then finishes off
> the
> > > Bean by putting in the functionality they want to call then
recompiling
> > the
> > > Bean.
> > > 4. The developer modifies their JSP page to call the Bean's added
> > > functionality then refreshes their JSP to find that the new
> functionality
> > > isn't turning up.
> > >
> > > The reason the new functionality doesn't turn up is that the JSP
> > > server/container, while having the ability to detect changes to JSP's,
> > > probably servlets, and maybe even includes, is not implemented to
detect
> > > changed support classes (like Beans) and reload them dynamically. By
> > > restarting your server, you've forced the JSP server/container to
reload
> > > your support class.
> > >
> > > Rob
> > >
> > > ----- Original Message -----
> > > From: "cupid1" <[EMAIL PROTECTED]>
> > > To: "Rob L'Estrange" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 21, 2001 7:17 PM
> > > Subject: Re: problem with javaBean and jsp
> > >
> > >
> > > > Rob,
> > > >
> > > > I restarted the server and it worked. Amazing!. So what is the deal
> > about
> > > > restarting the server? Thanks.
> > > >
> > > > shuaib
> > > >
> > > > ----- Original Message -----
> > > > From: "Rob L'Estrange" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Thursday, March 22, 2001 3:25 PM
> > > > Subject: Re: problem with javaBean and jsp
> > > >
> > > >
> > > > > Hi Bud
> > > > >
> > > > > Try totally restarting your JSP server then try again. No
> guarantees,
> > > but
> > > > it
> > > > > is something I would try.
> > > > >
> > > > > Rob
> > > ----- Original Message -----
> > > From: "cupid1" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 21, 2001 6:20 PM
> > > Subject: Re: problem with javaBean and jsp
> > >
> > >
> > > > Here is my jsp code.
> > > >
> > > > <html>
> > > >
> > > > <jsp:useBean id="mybean" class="hello.NameHandler" />
> > > >
> > > > <h1>Hello, <jsp:getProperty name="mybean" property="username"
/>!</h1>
> > > >
> > > > </html>
> > > >
> > > > here is the bean.
> > > >
> > > > package hello;
> > > >
> > > > public class NameHandler {
> > > >
> > > > private String username;
> > > >
> > > > public NameHandler() {
> > > > username = "John Doe";
> > > > }
> > > >
> > > > public void setUsername( String name ) {
> > > > username = name;
> > > > }
> > > >
> > > > public String getUsername() {
> > > > return username;
> > > > }
> > > > }
> > > >
> > > > when I test it it says
> > > > hello, !
> > > >
> > > > It should say Hello John Doe!
> > > >
> > > > what is wrong?
> > > >
> > > > Thanks.
> > > >
> > > > shuaib
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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