Feature #5142
Make it possible for users to change to another cn in the D1Client class in d1_libclient_java module
Status:
Closed
Priority:
Normal
Assignee:
Ben Leinfelder
Category:
d1_libclient_java
Target version:
-
Start date:
Due date:
% Done:
100%
Milestone:
None
Product Version:
*
Story Points:
Sprint:
Description
Member Nodes want to be able to choose which environment they will register in without shutting down to do so.
In the D1Clieint class, there is a static class field CNode. After the CNode was initialized, there is no way to change the CN:
public static CNode getCN(Session session) throws ServiceFailure {
if (cn == null) {
// get the CN URL
String cnUrl = Settings.getConfiguration().getString("D1Client.CN_URL");
// determine which implementation to instantiate String cnClassName = Settings.getConfiguration().getString("D1Client.cnClassName"); if (cnClassName != null) { // construct it using reflection try { cn = (CNode) Class.forName(cnClassName).newInstance(); } catch (Exception e) { throw D1Node.recastClientSideExceptionToServiceFailure(e); } cn.setNodeBaseServiceUrl(cnUrl); } else { // default cn = new CNode(cnUrl, session); } } return cn; }
Related issues
History
#1 Updated by Ben Leinfelder over 10 years ago
- Status changed from New to In Progress
- Assignee set to Ben Leinfelder
Added the method to D1Client. It uses the supplied cnURL and replaces the static CNode instance with one that uses the given url. Subsequent calls to the parameter-less method will retrieve the CNode instance with the new URL.
#2 Updated by Ben Leinfelder over 10 years ago
- Category set to d1_libclient_java
- Status changed from In Progress to Closed
#3 Updated by Rob Nahf over 10 years ago
- Description updated (diff)
#4 Updated by Rob Nahf over 10 years ago
- Description updated (diff)
#5 Updated by Rob Nahf almost 9 years ago
- Related to Bug #7642: D1Client.getCN(Session s) method doesn't use the session added