This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 62734 - Provide Tomcat integration based only on tomcat5.exe on Windows
Summary: Provide Tomcat integration based only on tomcat5.exe on Windows
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P4 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-21 16:36 UTC by _ gtzabari
Modified: 2009-01-14 16:01 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2005-08-21 16:36:55 UTC
Catalina.bat is not installed by the windows (EXE) installer (whereas it is with
the ZIP package). If possible, the profiler should not depend upon the existance
of catalina.bat for integration because (I think) you could invoke the same
command-line against tomcat5.exe.
Comment 1 Jiri Sedlacek 2005-08-22 06:16:42 UTC
Thanks for the hint, will do more research about it.

As a workaround for now, catalina.bat can be simply copied from NetBeans-
bundled Tomcat, it will work with any Tomcat 5.5.
Comment 2 _ gtzabari 2005-08-22 06:27:11 UTC
It looks to me like JProfiler creates a batch file (like our profiler already
does) but instead of basing it on a preexisting catalina.bat they write their
own from scratch to wrap tomcat5.exe... I didn't look in their batch file but I
assume they do what our profiler does, setting up JVM arguments before launching
the JVM. Anyway, you might want to use their work as a baseline if possible.
Comment 3 Jiri Sedlacek 2005-08-22 06:50:36 UTC
As I can see, JProfiler 3.x and 4.x explicitely asks for startup.bat in order 
to do the integration. I think at least using catalina.bat is more general, the 
startup.bat depends on it.

If you examine catalina.bat in more detail, you'll find out that it calls 
directly java.exe instead of tomcat5.exe, so it isn't just a wrapper for it. I 
have the feeling that using tomcat5.exe runs the Tomcat as a Windows service, 
but I'm not sure about it.

At least, it shouldn't be a problem to generate some catalina-like script from 
the template to avoid depending on catalina.bat.

In fact the JProfiler needs to do exactly the same as NetBeans Profiler, just 
to start the JVM with additional arguments and eventually add some stuff to %
PATH%.
Comment 4 _ gtzabari 2005-08-22 17:07:03 UTC
I don't know which version of JProfiler you're looking at (I'm looking at the
latest) but the one on my end does not depend on any Tomcat batch files at all.
On my end it creates a batch file start_tomcat_jprofiler.bat containing:

rem This file was generated by the application server
rem integration wizard of JProfiler
 
set PATH=C:\Program Files\jprofiler4\bin\windows;%PATH%
set PR_JVMOPTIONS=-agentlib:jprofilerti=port=8849;-Xbootclasspath/a:C:\Program
Files\jprofiler4\bin\agent.jar;%PR_JVMOPTIONS%
tomcat5.exe

that's it... as per your second question, tomcat5w.exe runs as a service,
tomcat5.exe seems to run as a normal console application.
Comment 5 Jiri Sedlacek 2005-08-22 17:42:21 UTC
I'm sorry, I didn't see the Apache Tomcat 5.x (with tomcat5.exe) option in 
JProfiler 4.

It's definitely a good idea, but why not to start Tomcat directly using 
bootstrap.jar? This would be OS-independent, except all environmental settings 
around - which are actually done in catalina.bat/sh and thats the real meaning 
of that script.

But I agree that for Windows users it is confusing to depend on catalina.bat 
which isn't bundled with all Tomcat distributions. We'll implement catalina-
independent approach on Windows for some of following Profiler Milestones. 

Thanks for the recommendation.
Comment 6 J Bachorik 2006-04-27 12:47:05 UTC
AttachWizard recognizes the "exe-only" installation of Tomcat5 and creates a new
catalina_nbprofiler.bat script starting the tomcat5 service in console mode with
appropriate JVM options.
Comment 7 Rashid Urusov 2009-01-14 16:01:40 UTC
VERIFIED in Build 200901140201