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 129041

Summary: Provide programmatic way to remove server instance
Product: serverplugins Reporter: Petr Hejl <phejl>
Component: InfrastructureAssignee: Petr Hejl <phejl>
Status: RESOLVED FIXED    
Severity: blocker CC: abadea, apireviews, pcw
Priority: P2 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: patch
New suggested diff for changes to InstanceProperties.java
included changes posted by peter
fixed link

Description Petr Hejl 2008-03-03 16:56:07 UTC
Right now the only code removing registered server instance is placed in non public RemoveAction.

The proposed change will introduce simple method Deployment.removeInstance(String instanceId, boolean stop).
Comment 1 Petr Hejl 2008-03-03 17:29:06 UTC
Well for our purposes it would be much better to have it in InstanceProperties providing just the necessary removal
without additional steps. Sorry for the confusion.

Attaching diff.
Comment 2 Petr Hejl 2008-03-03 17:32:12 UTC
Created attachment 57689 [details]
patch
Comment 3 _ pcw 2008-03-03 17:44:47 UTC
Just a nit on the patch -- your removeInstance method uses the parameter name "serverInstanceId" to identify the server.

The create...() methods use the name "url".  I think the names should be the same to make it clear that the value passed
into the create...() routine as the URL field is the same value that should be used when remove...() is called.

I know it's not a URL at all (URI instead?), but it's too late to do much about that inconsistency.

I just think they should be the same name, otherwise there may be confusion over whether they represent the same value
(which they must for the code to work).

I would like to rewrite the comments a little, I'll attach a different diff later for that.

Comment 4 Petr Hejl 2008-03-03 20:09:36 UTC
I agree, you are definitely right. Thanks for the correction.
Comment 5 _ pcw 2008-03-03 20:15:01 UTC
Created attachment 57697 [details]
New suggested diff for changes to InstanceProperties.java
Comment 6 Petr Hejl 2008-03-03 20:45:07 UTC
Created attachment 57698 [details]
included changes posted by peter
Comment 7 _ pcw 2008-03-03 22:43:07 UTC
Please put the label back at the end of the @link I wrote, otherwise it looks bad in the help... e.g. it should be:

{@link #createInstancePropertiesWithoutUI(String, String, String, String, Map) createInstancePropertiesWithoutUI}

This is recommended in the docs on javadoc -- http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html#{@link}



Comment 8 Petr Hejl 2008-03-04 14:18:57 UTC
Created attachment 57730 [details]
fixed link
Comment 9 Andrei Badea 2008-03-04 14:21:37 UTC
I agree with the change.
Comment 10 Petr Hejl 2008-03-04 16:44:55 UTC
If there is no objections I will integrate this tomorrow.
Comment 11 Petr Hejl 2008-03-05 09:27:17 UTC
Fixed in changeset 2abccc63a0ab.
Comment 12 Petr Hejl 2008-04-08 08:59:19 UTC
*** Issue 56105 has been marked as a duplicate of this issue. ***