Moxkiriyaプロジェクト事前開発用の作業部屋
修订版 | 9ec832aa6040ea85aea6d39830d64fb01383b5b3 (tree) |
---|---|
时间 | 2018-10-08 17:15:08 |
作者 | Harold_Andoh <andolloyd@gmai...> |
Commiter | Harold_Andoh |
[Moxkiriya7]
@@ -137,8 +137,8 @@ public class WikiMainWindow { | ||
137 | 137 | SettingManager settingMgr = SettingManager.getInstance(); |
138 | 138 | String path = settingMgr.get(SettingManager.SETTINGSKEY_MOXKIRIYA_USER_DIR); |
139 | 139 | String configXML = settingMgr.get(SettingManager.SETINGKEY_CLUSTER).equals("true") |
140 | - ? "repository_cluster.xml" | |
141 | - : "repository_local.xml"; | |
140 | + ? WikiRepository.REPOSITORY_CUSTER_FILENAME | |
141 | + : WikiRepository.REPOSITORY_LOCAL_FILENAME; | |
142 | 142 | File file = new File(path + "/" + settingMgr.getSelectedParty() + "/" + configXML); |
143 | 143 | |
144 | 144 | if(file.exists() != true) { |
@@ -46,8 +46,8 @@ import com.wiki.standalone.moxkiriya.PageData.FileData; | ||
46 | 46 | * |
47 | 47 | */ |
48 | 48 | public class WikiRepository { |
49 | - /** repository_cluster.xml */ | |
50 | - public static final String REPOSITORY_CUSTER_FILENAME = "repository_cluster.xml"; | |
49 | + /** repository_cluster_derby.xml */ | |
50 | + public static final String REPOSITORY_CUSTER_FILENAME = "repository_cluster_derby.xml"; | |
51 | 51 | |
52 | 52 | /** repository_local.xml */ |
53 | 53 | public static final String REPOSITORY_LOCAL_FILENAME = "repository_local.xml"; |
@@ -484,11 +484,15 @@ public class WikiRepository { | ||
484 | 484 | String macAddress = getMacAddress(); |
485 | 485 | String username = System.getProperty("user.name"); |
486 | 486 | String approot = settingMgr.get(SettingManager.SETTINGSKEY_WIKIROOT); |
487 | + String partyName = settingMgr.getSelectedParty(); | |
487 | 488 | |
488 | - System.setProperty("cluster.id", String.valueOf(macAddress.hashCode() + username)); | |
489 | + System.setProperty("cluster.id", String.valueOf(macAddress.hashCode() | |
490 | + + "-" + partyName | |
491 | + + "-" + username)); | |
489 | 492 | System.setProperty("wiki.root", approot); |
490 | 493 | |
491 | 494 | if(settingMgr.get(SettingManager.SETINGKEY_CLUSTER).equals("true")) { |
495 | + System.setProperty("party.name", partyName); | |
492 | 496 | System.setProperty("cluster.setting", "TRUE"); |
493 | 497 | System.setProperty("dbserver.url", settingMgr.get(SettingManager.SETINGKEY_DBSERVER_URL)); |
494 | 498 | System.setProperty("dbserver.port", settingMgr.get(SettingManager.SETINGKEY_DBSERVER_PORT)); |
@@ -43,7 +43,7 @@ | ||
43 | 43 | data store configuration |
44 | 44 | --> |
45 | 45 | <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"> |
46 | - <param name="path" value="${wiki.root}/datastore"/> | |
46 | + <param name="path" value="${wiki.root}/${party.name}/datastore"/> | |
47 | 47 | <param name="minRecordLength" value="1024"/> |
48 | 48 | </DataStore> |
49 | 49 |
@@ -117,7 +117,7 @@ | ||
117 | 117 | <param name="url" value="jdbc:derby://192.168.123.25:1527/moxkiriyadb/workspace/db;create=true"/> |
118 | 118 | <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/> |
119 | 119 | --> |
120 | - <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/workspace/db;create=true"/> | |
120 | + <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/${party.name}/workspace/db;create=true"/> | |
121 | 121 | <param name="driver" value="${jdbc.driver}"/> |
122 | 122 | <param name="schemaObjectPrefix" value="${wsp.name}_"/> |
123 | 123 | <param name="externalBLOBs" value="true"/> |
@@ -156,7 +156,7 @@ | ||
156 | 156 | implementations. |
157 | 157 | --> |
158 | 158 | <PersistenceManager class="org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager"> |
159 | - <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/version/db;create=true"/> | |
159 | + <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/${party.name}/version/db;create=true"/> | |
160 | 160 | <param name="driver" value="${jdbc.driver}"/> |
161 | 161 | <param name="schemaObjectPrefix" value="version_"/> |
162 | 162 | <param name="externalBLOBs" value="true"/> |
@@ -179,15 +179,14 @@ | ||
179 | 179 | <!-- |
180 | 180 | <Journal class="org.apache.jackrabbit.core.journal.FileJournal"> |
181 | 181 | <param name="revision" value="${rep.home}/revision.log" /> |
182 | - <param name="directory" value="${wiki.root}/journal" /> | |
182 | + <param name="directory" value="${wiki.root}/${party.name}/journal" /> | |
183 | 183 | </Journal> |
184 | 184 | --> |
185 | 185 | <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> |
186 | 186 | <param name="revision" value="${rep.home}/revision.log" /> |
187 | 187 | <param name="driver" value="${jdbc.driver}" /> |
188 | - <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/journal/db;create=true"/> | |
188 | + <param name="url" value="${dbserver.url}:${dbserver.port}/moxkiriyadb/${party.name}/journal/db;create=true"/> | |
189 | 189 | <param name="databaseType" value="derby"/> |
190 | 190 | </Journal> |
191 | 191 | </Cluster> |
192 | -</Repository> | |
193 | - | |
192 | +</Repository> | |
\ No newline at end of file |