diff --git a/pom.xml b/pom.xml
index 479cae69f..22e6677b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
redcomet
knowledge
war
- 0.2.2
+ 0.2.3
webapp for knowledge
https://support-project.org/
@@ -17,7 +17,7 @@
redcomet
web
- 0.2.1
+ 0.2.2
diff --git a/src/main/java/redcomet/knowledge/config/AppConfig.java b/src/main/java/redcomet/knowledge/config/AppConfig.java
index 819e04297..1ded72e2e 100644
--- a/src/main/java/redcomet/knowledge/config/AppConfig.java
+++ b/src/main/java/redcomet/knowledge/config/AppConfig.java
@@ -33,5 +33,4 @@ public void setIndexPath(String indexPath) {
this.indexPath = indexPath;
}
-
}
diff --git a/src/main/resources/appconfig.xml b/src/main/resources/appconfig.xml
index 646bee0a1..e23c1e5a4 100644
--- a/src/main/resources/appconfig.xml
+++ b/src/main/resources/appconfig.xml
@@ -3,6 +3,7 @@
Asia/Tokyo
{user.home}/.knowledge/index/
{user.home}/.knowledge/tmp/
+ {user.home}/.knowledge/db/
5
diff --git a/src/main/resources/connection.xml b/src/main/resources/connection.xml
index e43ab4ca6..d4f89ead2 100644
--- a/src/main/resources/connection.xml
+++ b/src/main/resources/connection.xml
@@ -1,7 +1,7 @@
org.h2.Driver
- jdbc:h2:{user.home}/.knowledge/knowledge_db
+ jdbc:h2:tcp://localhost/./knowledge_db
sa
public
diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml
index 37a308641..832615604 100644
--- a/src/main/resources/log4j.xml
+++ b/src/main/resources/log4j.xml
@@ -72,7 +72,7 @@
-
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 8e0b5188f..4d717fa84 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -6,6 +6,9 @@
knowledge
+
+ redcomet.web.listener.H2DBManagerListener
+
redcomet.knowledge.deploy.InitializationListener
diff --git a/src/test/java/redcomet/knowledge/tool/AddSampleDatas.java b/src/test/java/redcomet/knowledge/tool/AddSampleDatas.java
index 20c7d57b4..a645d2746 100644
--- a/src/test/java/redcomet/knowledge/tool/AddSampleDatas.java
+++ b/src/test/java/redcomet/knowledge/tool/AddSampleDatas.java
@@ -9,18 +9,21 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.h2.tools.Server;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
+import redcomet.common.config.ConfigLoader;
import redcomet.common.config.INT_FLAG;
import redcomet.common.log.Log;
import redcomet.common.log.LogFactory;
import redcomet.knowledge.deploy.InitDB;
import redcomet.ormapping.common.DBUserPool;
import redcomet.ormapping.tool.dao.InitializeDao;
+import redcomet.web.config.AppConfig;
import redcomet.web.config.GroupRoleType;
import redcomet.web.dao.GroupsDao;
import redcomet.web.dao.UserGroupsDao;
@@ -37,6 +40,12 @@ public class AddSampleDatas {
private static Log LOG = LogFactory.getLog(AddSampleDatas.class);
public static void main(String[] args) throws Exception {
+ AppConfig appConfig = ConfigLoader.load(AppConfig.APP_CONFIG, AppConfig.class);
+ String[] parms = {"-tcp", "-baseDir", appConfig.getDatabasePath()};
+
+ Server server = Server.createTcpServer(parms);
+ server.start();
+
// 内部的には、日付はGMTとして扱う
TimeZone zone = TimeZone.getTimeZone("GMT");
TimeZone.setDefault(zone);
@@ -50,6 +59,17 @@ public static void main(String[] args) throws Exception {
addSampleDatas.doInitialize();
AddSampleKnowledge.main(args);
+
+
+ server.stop();
+// int count = 0;
+// while(true) {
+// Thread.sleep(1000);
+// count++;
+// if (count > 300) {
+// break;
+// }
+// }
}
public void createTables() {