Bug 135324 - ServerInstance representation in the API
ServerInstance representation in the API
Status: RESOLVED FIXED
Product: serverplugins
Classification: Unclassified
Component: Infrastructure
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Petr Hejl
issues@serverplugins
: API, API_REVIEW_FAST
Depends on:
Blocks: 133751
  Show dependency treegraph
 
Reported: 2008-05-19 15:13 UTC by Petr Hejl
Modified: 2008-06-03 04:12 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
proposed change (26.29 KB, text/plain)
2008-05-21 11:52 UTC, Petr Hejl
Details
updated patch (getServerInstance null check) (26.76 KB, text/plain)
2008-05-22 10:54 UTC, Petr Hejl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2008-05-19 15:13:13 UTC
The Deployment facade contains many methods like getServer"Something"(String serverId). It is also not clear whether
null/false return values mean that the server instance was removed or it is the real value. This should be refactored to
single ServerInstance class. Methods that will be deprecated in favor of ServerInstance:

public String getServerInstanceDisplayName (String id)
public String getServerID (String instanceId)
public J2eePlatform getJ2eePlatform(String serverInstanceID)
public String getServerDisplayName(String id)
public boolean isRunning(String serverInstanceID)
Comment 1 Petr Hejl 2008-05-21 11:50:30 UTC
Attaching proposed change.
Comment 2 Petr Hejl 2008-05-21 11:52:37 UTC
Created attachment 61671 [details]
proposed change
Comment 3 Erno Mononen 2008-05-22 10:36:24 UTC
EM01: Shouldn't Deployment#getServerInstance(String) check for null, even if it is not a legal parameter? Looks like 
passing a null would result to InstanceRemovedException when invoking methods on the returned ServerInstance, which 
could be rather confusing.
Comment 4 Petr Hejl 2008-05-22 10:53:47 UTC
Re EM01: You are absolutely right about that. Fixed in following patch.
Comment 5 Petr Hejl 2008-05-22 10:54:52 UTC
Created attachment 61745 [details]
updated patch (getServerInstance null check)
Comment 6 Petr Hejl 2008-05-29 10:09:53 UTC
If there are no objections, I'll push this tomorrow.
Comment 7 Petr Hejl 2008-05-30 10:35:16 UTC
Fixed in abfdb8bc2994.
Comment 8 Quality Engineering 2008-06-03 04:12:34 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #234 build
Changeset: http://hg.netbeans.org/main/rev/abfdb8bc2994
User: phejl@netbeans.org
Log: #135324 ServerInstance representation in the API


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo