Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 32534 invoked from network); 18 Oct 2010 21:36:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Oct 2010 21:36:05 -0000 Received: (qmail 46422 invoked by uid 500); 18 Oct 2010 21:36:01 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 46223 invoked by uid 500); 18 Oct 2010 21:36:01 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 46210 invoked by uid 99); 18 Oct 2010 21:36:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 21:36:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Oct 2010 21:35:53 +0000 Received: from [192.168.245.129] (p549E0BF0.dip0.t-ipconnect.de [84.158.11.240]) by tor.combios.es (Postfix) with ESMTPA id 4C4B6226111 for ; Mon, 18 Oct 2010 23:31:55 +0200 (CEST) Message-ID: <4CBCBDA2.9010502@ice-sa.com> Date: Mon, 18 Oct 2010 23:35:30 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat 6.0.29 - Windows Service - JMX References: <4CBCA1B0.5070401@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Leo Donahue - PLANDEVX wrote: >> -----Original Message----- >> From: Andr� Warnier [mailto:aw@ice-sa.com] >> Subject: Re: Tomcat 6.0.29 - Windows Service - JMX >> Sorry if I ask, but how are you starting Tomcat in the second case ? as >> a Service ? >> > > Yes. Starting Tomcat in the second case as a windows service. Created the windows service using the service.bat - service install Tomcat6 > I'll add a 3rd case : if you navigate to (catalina_home)\bin and double-click "tomcat6.exe", then in jvisualvm appears a local "unknown application" for that Tomcat. The differences I can think of : - using "net start tomcat.." starts the "tomcat6.exe" executable/wrapper (as a Service), which in turn runs a JVM, but using Windows Registry settings, not environment variables. In that case, the process (as seen by the Task Manager) appears to run "tomcat6.exe", not "java.exe" In this case, the application does not appear in jvisualvm. - launching tomcat6.exe directly, although it is the same wrapper, does not start tomcat as a Service, but starts it in a console window. But I presume that it uses the same Registry settings as above. In that case, the process (as seen by the Task Manager) also appears to run "tomcat6.exe", not "java.exe". In this case, the application appears in jvisualvm, as an "unknown application (pid xxxx)" - using startup.bat : (itself calling catalina.bat), tomcat is not started as a service, it runs in a console window. Also, it uses a bunch of environment variables and command-line parameters, set by startup.bat and catalina.bat and setenv.bat etc.. Also, in that case the executable which runs is "java.exe". In this case, the application appears in jvisualvm, as a "tomcat (pid xxxx)" I believe tbat the difference is due to the /user/ used to run tomcat. In the case of the Service, the standard setup makes it run as "LocalSystem". And in that case, the application does not appear in jvisualvm. When tomcat is started in a command window however (the 2 other cases above), then it runs under the same user-id as the one you are logged-in as (*), and in that case jvisualvm "finds it". (*) bad English, that is, but I don't know how to say this otherwise To confirm this, I used the Windows Services applet to change the user under which tomcat runs, to be the same as my Windows login-id, then restarted the Service. And tadaaaa, jvisualvm then finds it (but as the "unknown application"). So the fact of running either on the base of Registry settings or on the base of environment variables seems to have a bearing on jvisualvm's ability to find a name for the application. And the fact of running as either LocalSystem, or as the same user running jvisualvm, seems to determine if jvisualvm finds the application or not. But do not ask me why this is so. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org