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 92796 - Attach Wizard do not perform automatic integration with GlassFish
Summary: Attach Wizard do not perform automatic integration with GlassFish
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-18 18:15 UTC by Alexander Kouznetsov
Modified: 2007-07-26 10:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kouznetsov 2007-01-18 18:15:58 UTC
Profiler 070118
NetBeans IDE Dev (Build 200701141900)
1.5.0_10; Java HotSpot(TM) Client VM 1.5.0_10-b03
Windows XP version 5.1 running on x86
ru_RU (nb); Cp1251
Sun Java System Application Server Enterprise Edition 9.1 (build b28)

Steps to reproduce:
- Invoke Attach Wizard.
- Select J2EE Web/App Server, GlassFish, Local, Direct. Click Next twice.
- Select Automatic. Click Next.
- Provide GlassFish installation directory. Click Next.
- Click Perform.
- RESULT: Go to domain.xml file and ensure that there is no <profiler> section added.
Comment 1 Alexander Kouznetsov 2007-01-18 18:37:07 UTC
To experience described behavior try to run the GlassFish from Runtime tab after its domain.xml was automatically modified. This will remove <profiler> section from domain.xml. If you will try to integrated it again - you'll experience the described behavior.
Comment 2 Jiri Sedlacek 2007-01-18 20:17:07 UTC
Could you please describe better the problem? I don't understand if the profiler
section in domain.xml is missing immediately after automatic integration
performed by the Attach Wizard or if it's removed during starting the server
from Runtime tab.

If this bug is filed against the second case, it's not a bug but a feature.
There are two possibilities how to start the server from Runtime tab - Start
(which removes profiler section to allow the server to start "normally") or
Start in Profiling Mode (which adds profiler section automatically if necessary).

Attach Wizard and it's automatic integration is used for "external" server
starting (automatic startup is feature of Attach Wizard, not the IDE) according
to given instructions and shouldn't be mixed with manipulating the server from
Runtime tab. These are two different approaches. More information can be found
at http://profiler.netbeans.org/docs/help/5.5/profile_j2ee.html.
Comment 3 Alexander Kouznetsov 2007-01-19 09:30:00 UTC
Try the following scenario:
- Invoke Attach Wizard.
- Select J2EE Web/App Server, GlassFish, Local, Direct. Click Next twice.
- Select Automatic. Click Next.
- Provide GlassFish installation directory. Click Next.
- Click Perform.
- Discard all the dialogs

- Open the same server from Runtime and Start it.
- Stop server.

- Invoke Attach Wizard.
- Select J2EE Web/App Server, GlassFish, Local, Direct. Click Next twice.
- Select Automatic. Click Next.
- Provide GlassFish installation directory. Click Next.
- Click Perform.
- RESULT: Go to domain.xml file and ensure that there is no <profiler> section added.

There is no chance that user will not apply both approaches to the same server.
Comment 4 Jiri Sedlacek 2007-02-15 15:15:14 UTC
The reason is that Attach Wizard adds special header in domain.xml with 
information about the modification and where to find backup of original file. 
Based on existence of this header it decides whether the file will be modified 
or already has been modified and subsequent modification is skipped.

Because the serverplugin removes <profiler> section from domain.xml when 
starting the server "normally" but leaves the header there, Attach Wizard 
doesn't recognize that the script actually needs to be modified again and skips 
the modification. This is a bug - Attach Wizard should check existence 
of "<profiler name="NetBeansProfiler"... >" rather than checking just the 
header.
Comment 5 J Bachorik 2007-07-26 10:40:34 UTC
fixed in trunk