Skip to content
Browse files

dynamic server qa

git-svn-id: svn://svn.caucho.com/resin/trunk@8510 9c94448d-38f1-0310-a231-d98308ff1ebf
  • Loading branch information...
1 parent 0314b5b commit 640d8d70c323eebc4ba777f38eb3461f2bc6968e ferg committed Oct 21, 2011
View
24 modules/resin/src/com/caucho/security/AdminAuthenticator.java
@@ -99,27 +99,23 @@ public final void initStore()
if (_authStore != null)
return;
- CacheImpl authStoreImpl = DistCacheSystem.getMatchingCache("resin:authenticator");
+ AbstractCache authStore = new ClusterCache();
- if (authStoreImpl == null) {
- AbstractCache authStore = new ClusterCache();
+ authStore.setAccessedExpireTimeoutMillis(Period.FOREVER);
+ authStore.setModifiedExpireTimeoutMillis(Period.FOREVER);
- authStore.setAccessedExpireTimeoutMillis(Period.FOREVER);
- authStore.setModifiedExpireTimeoutMillis(Period.FOREVER);
+ authStore.setName("resin:authenticator");
+ authStore.setScopeMode(AbstractCache.Scope.CLUSTER);
- authStore.setName("resin:authenticator");
- authStore.setScopeMode(AbstractCache.Scope.CLUSTER);
-
- authStore.createIfAbsent();
- }
-
- _authStore = DistCacheSystem.getMatchingCache("resin:authenticator");
+ _authStore = authStore.createIfAbsent();
}
private synchronized void reloadFromStore()
{
- Hashtable<String, PasswordUser> userMap
- = (Hashtable<String, PasswordUser>) _authStore.get(ADMIN_AUTH_MAP_KEY);
+ Hashtable<String, PasswordUser> userMap = null;
+
+ if (_authStore != null)
+ userMap = (Hashtable<String, PasswordUser>) _authStore.get(ADMIN_AUTH_MAP_KEY);
if (userMap != null)
_userMap = userMap;
View
9 modules/resin/src/com/caucho/server/resin/Resin.java
@@ -706,6 +706,7 @@ public static String getCurrentServerId()
public void setJoinCluster(String clusterId)
{
_dynamicJoinCluster = clusterId;
+ System.out.println("JC: " + _dynamicJoinCluster);
}
/**
@@ -1271,8 +1272,10 @@ private void configureServer()
String clusterId = "";
if (_dynamicJoinCluster != null) {
+ clusterId = _dynamicJoinCluster;
+
CloudServer cloudServer = joinCluster(bootResin.getCloudSystem());
-
+ System.out.println("JOIN: " + cloudServer);
if (cloudServer != null)
clusterId = cloudServer.getCluster().getId();
}
@@ -1292,8 +1295,8 @@ else if (bootResin.getClusterList().size() == 0) {
clusterConfig.init();
}
else {
- throw new ConfigException(L().l("'{0}' is an unknown server in the configuration file.",
- _serverId));
+ throw new ConfigException(L().l("'{0}' is an unknown cluster in the configuration file.",
+ clusterId));
}
/*

0 comments on commit 640d8d7

Please sign in to comment.
Something went wrong with that request. Please try again.