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 120379 - Registry should allow plugin to set bundle of properties "atomically"
Summary: Registry should allow plugin to set bundle of properties "atomically"
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2007-10-29 17:09 UTC by Petr Hejl
Modified: 2007-12-07 16:36 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
proposed patch (12.35 KB, text/plain)
2007-11-19 15:49 UTC, Petr Hejl
Details
proposed patch (previous patch missing spec version) (12.87 KB, text/plain)
2007-11-19 16:05 UTC, Petr Hejl
Details
comments reflected (21.70 KB, text/plain)
2007-11-20 20:01 UTC, Petr Hejl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2007-10-29 17:09:00 UTC
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
instance.

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.
Comment 1 Petr Hejl 2007-10-29 17:14:41 UTC
One of the bugs related to this is the issue 120321.
Comment 2 Petr Hejl 2007-11-19 15:49:08 UTC
Created attachment 53206 [details]
proposed patch
Comment 3 Petr Hejl 2007-11-19 16:05:05 UTC
Created attachment 53209 [details]
proposed patch (previous patch missing spec version)
Comment 4 Jaroslav Tulach 2007-11-19 20:08:25 UTC
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.
Comment 5 Petr Hejl 2007-11-20 19:58:48 UTC
Re Y01: Those tests are using method that is not part of the public api.
Re Y02: Fixed in the following patch.
Comment 6 Petr Hejl 2007-11-20 20:01:46 UTC
Created attachment 53262 [details]
comments reflected
Comment 7 Petr Hejl 2007-11-26 10:47:44 UTC
Thanks for your comments. I will implement changes contained in the last posted patch.
Comment 8 Petr Hejl 2007-11-27 15:48:46 UTC
Implemented.

Checking in apichanges.xml;
/cvs/j2eeserver/apichanges.xml,v  <--  apichanges.xml
new revision: 1.37; previous revision: 1.36
done
Checking in nbproject/project.properties;
/cvs/j2eeserver/nbproject/project.properties,v  <--  project.properties
new revision: 1.29; previous revision: 1.28
done
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
done
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
done
Checking in test/unit/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstanceTest.java;
/cvs/j2eeserver/test/unit/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstanceTest.java,v  <-- 
ServerInstanceTest.java
new revision: 1.7; previous revision: 1.6
done
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
done
RCS file: /cvs/j2eeserver/test/unit/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstancePropertiesTest.java,v
done
Checking in test/unit/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstancePropertiesTest.java;
/cvs/j2eeserver/test/unit/src/org/netbeans/modules/j2ee/deployment/plugins/api/InstancePropertiesTest.java,v  <-- 
InstancePropertiesTest.java
initial revision: 1.1
done