Revision 0b414bd5
Added by Andreas Müller over 15 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/LocalH2.java | ||
---|---|---|
96 | 96 |
//** ********************************************************************************/ |
97 | 97 |
|
98 | 98 |
public void init(){ |
99 |
logger.warn("LocalH2init");
|
|
99 |
logger.info("LocalH2init");
|
|
100 | 100 |
if (true){ //starting sever is not necessary for H2 |
101 | 101 |
return; |
102 | 102 |
} |
... | ... | |
128 | 128 |
logger.info("Start H2Server"); |
129 | 129 |
String[] args = new String[] { "-trace" }; |
130 | 130 |
h2Server = Server.createTcpServer(args).start(); |
131 |
if (logger.isDebugEnabled()){ |
|
132 |
for (int i = 0; i < 10; i++){ |
|
133 |
// logger.info("DatabaseName " + i + ": " + h2Server.getDatabaseName(i, true)); |
|
134 |
// logger.info("DatabaseName " + i + ": " + h2Server.getDatabaseName(i, false)); |
|
135 |
// logger.info("DatabasePath " + i + ": " + h2Server.getDatabasePath(i, true)); |
|
136 |
// logger.info("DatabasePath " + i + ": " + h2Server.getDatabasePath(i, false)); |
|
137 |
// logger.info("DatabaseType " + i + ": " + h2Server.getDatabaseType(i)); |
|
138 |
} |
|
139 |
} |
|
140 | 131 |
// h2Server.setDatabaseName(0, getDbName()); |
141 | 132 |
// h2Server.setDatabasePath(0, getDatabasePath()); |
142 | 133 |
h2Server.start(); |
143 |
// h2Server.checkRunning(true); |
|
144 | 134 |
} catch (SQLException sqle1) { |
145 | 135 |
logger.error("SQL Exception when starting Local H2Server: "+ sqle1); |
146 | 136 |
} catch (RuntimeException e1) { |
... | ... | |
199 | 189 |
} |
200 | 190 |
|
201 | 191 |
public void setLocalUrl(){ |
202 |
logger.warn("setLocalUrl");
|
|
192 |
logger.info("setLocalUrl");
|
|
203 | 193 |
String dbName = "cdmLocal"; |
204 | 194 |
setUrl(pureUrl + "file:" + getDefaultPath() + "/" + dbName); |
205 | 195 |
} |
Also available in: Unified diff
minor H2 changes