0

In IIS with ASP.NET , if there are two applications put in the it, it would create another two standalone w3wp.exe processes. So how about tomcat with war package? If I put two web1.war and web2.war to the webapps path, it would also create another two processes , or these two war package would just running in the same process as tomcat(share the same process tomcat.exe)?

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\web1.war

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\web2.war

From the task manger, I also cannot see the process Java.exe or Javaw.exe process. enter image description here

Jason
  • 1,115
  • 14
  • 25
  • 1
    The second. The behavior is fully specified by the [servlet lifecycle](http://docs.oracle.com/javaee/6/tutorial/doc/bnafi.html) (see also [JSR-154](https://jcp.org/en/jsr/detail?id=154)) and their are multiple implementations besides Tomcat. – Elliott Frisch Sep 22 '16 at 02:58
  • What happened when you tried it? – Andreas Sep 22 '16 at 03:02
  • @Elliott , so it means all of the war packages share the same process tomcat.exe? – Jason Sep 22 '16 at 03:19
  • @Andreas , the issue is if all of the war packages share the same process tomcat.exe , how to monitor the special war by the visualVM , support I just want to monitor the war1 and not the war2? – Jason Sep 22 '16 at 03:21
  • @Elliott, however I cannot see the process Java.exe or Javaw.exe process. please see the snapshot in the question – Jason Sep 22 '16 at 03:26
  • Do you see `tomcat.exe`? – Andreas Sep 22 '16 at 03:29
  • @Andreas , Yes, I can see the tomcat.exe, however cannot see the Java.exe or Javaw.exe. – Jason Sep 22 '16 at 03:30
  • Because `tomcat.exe` is the Tomcat process. @ElliottFrisch was mistaken in his expectation. But to answer to comment question "how to monitor the special war by the visualVM": You can't, unless you run them in two different Tomcat instances. – Andreas Sep 22 '16 at 03:32
  • @ Andreas , you mean all of the war share the same process tomcat.exe? and suppose if one of the war has the memory leak issue, then I just need to capture the core dump for the process tomcat.exe, am I right? – Jason Sep 22 '16 at 03:37
  • @Andreas ,I found the following URL, does it mean I can monitor one special appl in tomcat container? https://visualvm.java.net/jmx_connections.html ================================================================= java -Dcom.sun.management.jmxremote.port=3333 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.authenticate=false \ YourJavaApp – Jason Sep 22 '16 at 05:59
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/123906/discussion-between-jason-and-andreas). – Jason Sep 22 '16 at 06:12
  • If you're looking for a memory leak, you should definitely start a dedicated Tomcat for the app you're researching. – Andreas Sep 22 '16 at 13:45
  • @Andreas ,I found if I start the tomcat through Windows Service, then the process is tomcat.exe, however if I started it by startup.bat , then then process become to Java.exe , can you help to confirm it ? – Jason Sep 23 '16 at 01:43
  • Sure, if that's what you see. – Andreas Sep 23 '16 at 01:52
  • @Andreas, Thank you for your confirmation. – Jason Sep 23 '16 at 01:55

0 Answers0