Then next logical question in this thread would be what is the procedure for
having a  seperate / dedicated jvm for every web app running in the
webserver.
Assuming the web apps are running with tomcat and apache.
It would be great if someone could throw some light on the above.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com

----- Original Message -----
From: Isaac Shabtay <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 07, 2001 2:31 PM
Subject: Classloaders & JVM (was: Organizing Application Constants)


> Hi, sorry for jumping in, but:
>
> > Or rather, the
> > spec requires the platform to be implemented to use a different
> > classloader for each application, to make it appear to the program
> > that it's living in its very own JVM, and hence each application would
> > have its own singleton.  Check the 2.2 servlet spec and read up on
> > "web applications".
>
> Actually, the JVM spec (1.2.2 & 1.3) forbids having two different copies
of
> the
> same class under the same JVM, even if the copies were loaded using
> different class loaders
> (section 5.3.4, "Loading Constraints").
> Hence, the term "appear to the program that it's living in its very own
JVM"
> is not
> very correct. In fact, it imposes a problem. Consider the following
> scenario:
>
> I have two web applications inside a JVM. Each application has its own
> classpath.
> I have a JAR file that both should use. I copy it once to each
application -
> now I have
> two copies of the JAR file, one inside each application's classpath.
>
> I want to replace a class that is found inside the JAR file, so the
changes
> will imply
> only in application A. So, I go to A's claspath's JAR file and replace it.
> Then - boom!
> I have two different copies of the same class under the same JVM, then my
> application server
> throws me exceptions and I have to restart the whole thing.
>
>
>         - Isaac
>
>
===========================================================================
> 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
>

===========================================================================
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

Reply via email to