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 38628 - Consusing actions (start / stop) vs. (stop) on server instancies..
Summary: Consusing actions (start / stop) vs. (stop) on server instancies..
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 3.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Nam Nguyen
URL:
Keywords:
: 45942 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-12 12:44 UTC by Marek Fukala
Modified: 2009-02-13 19:36 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 Marek Fukala 2004-01-12 12:44:07 UTC
[20040111]
The current functionality is following:
When user runs the IDE and opens popup menu on a
server instance node there is 'Start / Stop
Server' action. Performing this action user will
get a dialog which allows to run the server. After
the server is started the popup menu exposes 'Stop
Server' action instead of the 'Start / Stop
Server'. This is behaviour is fine. Unfortunatelly
when user stops the server the action 'Stop' is
replaced by action 'Start / Stop' again. This
seems to me to be little bit confusing since we
know that we have just stopped it.

I suggest having two actions on the server
instance node:
Start Server
Stop Server

They are enabled/disabled according to the server
state. To avoid performance problems during popup
creation there are suggested two solutions:
1) let the actions enabled both for the first time
when user starts the IDE (we do not know if the
server is running or not)
2) create a background thread when the IDE is
started to test if the server is running or not.
Create a semapore for each server. This would
eliminate the delays during creation of the actions.

Since we check the server status for the first
time we can easily enable and disable the both
actions. The 'Start Server' action is disabled
(and 'Stop Server' action enabled) when the thread
which runs the server process is started. 
When the thread finishes do the same conversely.

The only risk of this model is that someone runs
the server externally on the some port after we
stopped our internall server instance. IMO this
case is very rare so it is not worth of an
additional test (and the weird 'Start / Stop
Server' action)
Comment 1 Petr Pisl 2004-02-03 14:13:48 UTC
Now there is some solution in the trunk. Do you think it's sufficient?
Comment 2 Marek Fukala 2004-02-03 14:25:37 UTC
I think its a sufficient solution for the 3.6 release. However it can
be implemented better to provide more clear and straightforward
mechanism to the users as was for example suggested by me. I am
changing target milestone to Promo-D.
Comment 3 Petr Pisl 2004-02-03 14:32:04 UTC
I agree with you. Because the code is in J2ee server I reassign the
issue to Nam
Comment 4 zikmund 2005-05-03 21:13:09 UTC
*** Issue 45942 has been marked as a duplicate of this issue. ***
Comment 5 Jiri Prox 2007-09-17 20:30:29 UTC
Obsolete milestone, please reevaluate
Comment 6 Vince Kraemer 2009-02-13 19:36:03 UTC
we do this