• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Moxkiriyaプロジェクト事前開発用の作業部屋


Commit MetaInfo

修订版9ec832aa6040ea85aea6d39830d64fb01383b5b3 (tree)
时间2018-10-08 17:15:08
作者Harold_Andoh <andolloyd@gmai...>
CommiterHarold_Andoh

Log Message

[Moxkiriya7]

  • クラスタリングのマルチPartyに対応

更改概述

差异

--- a/src/com/wiki/standalone/moxkiriya/WikiMainWindow.java
+++ b/src/com/wiki/standalone/moxkiriya/WikiMainWindow.java
@@ -137,8 +137,8 @@ public class WikiMainWindow {
137137 SettingManager settingMgr = SettingManager.getInstance();
138138 String path = settingMgr.get(SettingManager.SETTINGSKEY_MOXKIRIYA_USER_DIR);
139139 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;
142142 File file = new File(path + "/" + settingMgr.getSelectedParty() + "/" + configXML);
143143
144144 if(file.exists() != true) {
--- a/src/com/wiki/standalone/moxkiriya/WikiRepository.java
+++ b/src/com/wiki/standalone/moxkiriya/WikiRepository.java
@@ -46,8 +46,8 @@ import com.wiki.standalone.moxkiriya.PageData.FileData;
4646 *
4747 */
4848 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";
5151
5252 /** repository_local.xml */
5353 public static final String REPOSITORY_LOCAL_FILENAME = "repository_local.xml";
@@ -484,11 +484,15 @@ public class WikiRepository {
484484 String macAddress = getMacAddress();
485485 String username = System.getProperty("user.name");
486486 String approot = settingMgr.get(SettingManager.SETTINGSKEY_WIKIROOT);
487+ String partyName = settingMgr.getSelectedParty();
487488
488- System.setProperty("cluster.id", String.valueOf(macAddress.hashCode() + username));
489+ System.setProperty("cluster.id", String.valueOf(macAddress.hashCode()
490+ + "-" + partyName
491+ + "-" + username));
489492 System.setProperty("wiki.root", approot);
490493
491494 if(settingMgr.get(SettingManager.SETINGKEY_CLUSTER).equals("true")) {
495+ System.setProperty("party.name", partyName);
492496 System.setProperty("cluster.setting", "TRUE");
493497 System.setProperty("dbserver.url", settingMgr.get(SettingManager.SETINGKEY_DBSERVER_URL));
494498 System.setProperty("dbserver.port", settingMgr.get(SettingManager.SETINGKEY_DBSERVER_PORT));
--- a/src/com/wiki/standalone/moxkiriya/resources/repository_cluster.xml
+++ b/src/com/wiki/standalone/moxkiriya/resources/repository_cluster_derby.xml
@@ -43,7 +43,7 @@
4343 data store configuration
4444 -->
4545 <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"/>
4747 <param name="minRecordLength" value="1024"/>
4848 </DataStore>
4949
@@ -117,7 +117,7 @@
117117 <param name="url" value="jdbc:derby://192.168.123.25:1527/moxkiriyadb/workspace/db;create=true"/>
118118 <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
119119 -->
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"/>
121121 <param name="driver" value="${jdbc.driver}"/>
122122 <param name="schemaObjectPrefix" value="${wsp.name}_"/>
123123 <param name="externalBLOBs" value="true"/>
@@ -156,7 +156,7 @@
156156 implementations.
157157 -->
158158 <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"/>
160160 <param name="driver" value="${jdbc.driver}"/>
161161 <param name="schemaObjectPrefix" value="version_"/>
162162 <param name="externalBLOBs" value="true"/>
@@ -179,15 +179,14 @@
179179 <!--
180180 <Journal class="org.apache.jackrabbit.core.journal.FileJournal">
181181 <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" />
183183 </Journal>
184184 -->
185185 <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
186186 <param name="revision" value="${rep.home}/revision.log" />
187187 <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"/>
189189 <param name="databaseType" value="derby"/>
190190 </Journal>
191191 </Cluster>
192-</Repository>
193-
192+</Repository>
\ No newline at end of file