The InstanceProperties.createInstanceProperties(String url, String username, String password, String displayName) takes
four arguments and inside the registration sets the appropriate properties. However it is not enough in many cases. It
should allow to set up any number of properties atomically when registering the server.
The current state is that the serverplugin includes the required parameters to url or custom private singleton property
I would expect method like InstanceProperties createInstanceProperties(String url, String username, String password,
String displayName, Map customProps) with same behaviour as the current method, but that also configures all requested
properties before invoking *any* operation on the registered instance.
One of the bugs related to this is the issue 120321.
Created attachment 53206 [details]
Created attachment 53209 [details]
proposed patch (previous patch missing spec version)
Y01 Why there is a need to change tests, if this is supposed to be compatible change?
Y02 Why the tests were not changed to also test the new behaviour? Add one new assert, please.
Re Y01: Those tests are using method that is not part of the public api.
Re Y02: Fixed in the following patch.
Created attachment 53262 [details]
Thanks for your comments. I will implement changes contained in the last posted patch.
Checking in apichanges.xml;
/cvs/j2eeserver/apichanges.xml,v <-- apichanges.xml
new revision: 1.37; previous revision: 1.36
Checking in nbproject/project.properties;
/cvs/j2eeserver/nbproject/project.properties,v <-- project.properties
new revision: 1.29; previous revision: 1.28
Checking in src/org/netbeans/modules/j2ee/deployment/impl/ServerRegistry.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerRegistry.java,v <-- ServerRegistry.java
new revision: 1.56; previous revision: 1.55
Checking in src/org/netbeans/modules/j2ee/deployment/plugins/api/InstanceProperties.java;
/cvs/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstanceProperties.java,v <-- InstanceProperties.java
new revision: 1.23; previous revision: 1.22
Checking in test/unit/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstanceTest.java;
new revision: 1.7; previous revision: 1.6
Checking in test/unit/src/org/netbeans/modules/j2ee/deployment/impl/TargetServerTest.java;
/cvs/j2eeserver/test/unit/src/org/netbeans/modules/j2ee/deployment/impl/TargetServerTest.java,v <-- TargetServerTest.java
new revision: 1.8; previous revision: 1.7
RCS file: /cvs/j2eeserver/test/unit/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstancePropertiesTest.java,v
Checking in test/unit/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstancePropertiesTest.java;
initial revision: 1.1