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 66716 - New nbstartprofiledserver ant task incorrectly handles the forceRestart attribute
Summary: New nbstartprofiledserver ant task incorrectly handles the forceRestart attri...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
: 67523 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-13 14:46 UTC by Jiri Sedlacek
Modified: 2005-11-17 17:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Problematic code fragment with comments (1.19 KB, text/plain)
2005-10-13 14:47 UTC, Jiri Sedlacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Sedlacek 2005-10-13 14:46:04 UTC
(Reported few weeks ago directly via email.)

Concrete scenario (NB 5.0beta/daily build & Profiler M9/daily build):

- I start Tomcat using the Run Main Project action for a webapp
- While Tomcat is running, I choose Profile Main Project for the same webapp
- The task tries to start already running Tomcat again, which leads to 
java.net.BindException: Address already in use and related errors. Starting 
profiling session then fails.

The problem is that before starting Tomcat in profiling mode it isn't stopped 
by the task first, ignoring the forceRestart attribute which is hardcoded 
to 'true' in buildscript.

The problem is in ServerInstance.startProfileImpl() method. Concrete comments 
to the source code are attached below.

Here is summary of when the running server has to be stopped first before 
starting it again in profiling mode:

- if it's running in non-profiling mode
- if it's running in profiling mode but requested server settings differ from 
current
- if it's running and the forceRestart attribute is set to true

Moreover, any other server currently running in profiling mode has to be 
stopped first, before testing previous 3 conditions.

Please fix this for 5.0.
Comment 1 Jiri Sedlacek 2005-10-13 14:47:11 UTC
Created attachment 25920 [details]
Problematic code fragment with comments
Comment 2 Sherold Dev 2005-10-14 14:13:59 UTC
TM -> 5.0
Comment 3 Jiri Sedlacek 2005-10-26 09:41:04 UTC
*** Issue 67523 has been marked as a duplicate of this issue. ***
Comment 4 Sherold Dev 2005-11-17 17:38:42 UTC
F.

Checking in ant/antsrc/org/netbeans/modules/j2ee/ant/Bundle.properties;
/cvs/j2eeserver/ant/antsrc/org/netbeans/modules/j2ee/ant/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.3; previous revision: 1.2
done
Checking in ant/antsrc/org/netbeans/modules/j2ee/ant/StartProfiledServer.java;
/cvs/j2eeserver/ant/antsrc/org/netbeans/modules/j2ee/ant/StartProfiledServer.java,v
 <--  StartProfiledServer.java
new revision: 1.3; previous revision: 1.2
done
Checking in ant/src/org/netbeans/modules/j2ee/ant/Bundle.properties;
/cvs/j2eeserver/ant/src/org/netbeans/modules/j2ee/ant/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.5; previous revision: 1.4
done
Checking in
src/org/netbeans/modules/j2ee/deployment/devmodules/api/Bundle.properties;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.6; previous revision: 1.5
done
Checking in src/org/netbeans/modules/j2ee/deployment/devmodules/api/Deployment.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/Deployment.java,v
 <--  Deployment.java
new revision: 1.22; previous revision: 1.21
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/Bundle.properties;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.34; previous revision: 1.33
done
RCS file:
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerException.java,v
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/ServerException.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerException.java,v
 <--  ServerException.java
initial revision: 1.1
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java,v
 <--  ServerInstance.java
new revision: 1.68; previous revision: 1.67
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/TargetServer.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/TargetServer.java,v
 <--  TargetServer.java
new revision: 1.44; previous revision: 1.43
done
Checking in src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/ProgressUI.java,v
 <--  ProgressUI.java
new revision: 1.17; previous revision: 1.16
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/DebugAction.java,v
 <--  DebugAction.java
new revision: 1.3; previous revision: 1.2
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/ProfileAction.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/ProfileAction.java,v
 <--  ProfileAction.java
new revision: 1.3; previous revision: 1.2
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/RestartAction.java,v
 <--  RestartAction.java
new revision: 1.5; previous revision: 1.4
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StartAction.java,v
 <--  StartAction.java
new revision: 1.4; previous revision: 1.3
done
Checking in
src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/actions/StopAction.java,v
 <--  StopAction.java
new revision: 1.5; previous revision: 1.4
done