If you had each instance listen on a different port. I've used JBuilder 5 to test and run JSP pages. Each time I click the green arrow, I can set JBuilder to start a new instance... so I have tomcat:8080, tomcat:8082, tomcat:8084
Absolute proof that they are different JVM's is that the servlet error I fixed on my third try (which runs properly in 8084) is still broken in the first window (8080).
If you meant something like two jvm's that round-robin on a single port for load balancing.. I'm not sure if Tomcat supports this? anyone else? [This message has been edited by Mike Curwen (edited October 16, 2001).]
Joined: Oct 11, 2000
I created two directory for tomcat 1. c:\jakarta-tomcat , 2.c:\jakarta-tomcatone . each instance have different port, but the second instance I start is giving error "JVM bind error......" it means both instances are running in same JVM , how can I get each instace running in different JVM (two JVM for two instace). thanks
No, you are still running two JVM's, but the BIND error means you are trying to get your second instance of Tomcat to bind to a port the first one is using.
If you look in server.xml there are many ports that Tomcat binds (off hand, I can remember 8080, 8081, 8082, 8008 and 8443)
What I did was make two directories like you, and in my second server.xml file, I changed all of the 8*** ports to 9***, and two instances started up (from two different DOS windows). I should say that perhaps changing *all* of these numbers is not necessary, I really don't know. But for safety, I changed them all.
I made a simple change to the numguess servlet in the examples directory of my first instance, and using two browser windows, one at localhost:8080 and one at localhost:9080, I can get two separate behaviours in my modified numguess servlet. This is also reflected in the DOS window for that instance. (I modified it to System.out.println the number of guesses... only my modified instance produces this number in the DOS window. Proof, I'm pretty sure, that they represent two JVM's.
You might also consider a 'new' feature of Tomcat 4.0... I haven't read very much on it, and perhaps it's not really what you're trying to accomplish, but check out the document here: %CATALINA_HOME%\webapps\tomcat-docs\RUNNING.txt and starting at line 104 --> the (4)th point.
This makes reference to CATALINA_BASE for running multiple instances of Tomcat 4.0
[This message has been edited by Mike Curwen (edited October 17, 2001).]
Joined: Oct 11, 2000
thanks mike , i changed the ports 8*** to 9*** in second tomcat directory and now there is no "jvm bind err" in console , but how can we be sure that each instace is using separate jvm , i mean my system's default jvm is c:\programfiles\javasoft\jre....,so there is one jvm . do you mean that both tomcat instances are using this jvm but different process space or one instance is using "c:\programfiles\javasoft..." and other "c:\jdk1.3\jre\...", can you please make this jvm issue clear for me. thanks
Each Tomcat should be running under its own JVM. Please note the difference between the JVM "class" - c:\programfiles\javasoft\jre and instances of that class. A new JVM instance is created in each Windows process group. Tomcat actually supports running itself in multiple JVMs under a single startup if you get down and dirty with its runtime parameters. By default, however, everything within a single startup runs in the startup's initial JVM, however, since this is both more efficient and more convenient - it's a lot simpler to toss objects around inside a JVM than to bounce them between JVMs/
An IDE is no substitute for an Intelligent Developer.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com