Revision 33191 branches/v2_0_0_prep/libraries/libFMap_daldb/src/org/gvsig/fmap/dal/store/jdbc/JDBCServerExplorer.java
JDBCServerExplorer.java | ||
---|---|---|
221 | 221 |
DataManager dataMan = DALLocator.getDataManager(); |
222 | 222 |
DataStore store; |
223 | 223 |
try { |
224 |
store = dataMan.createStore(dsp);
|
|
224 |
store = dataMan.openStore(dsp.getDataStoreName(), dsp);
|
|
225 | 225 |
} catch (ValidateDataParametersException e) { |
226 | 226 |
throw new InitializeException(e); |
227 | 227 |
} |
... | ... | |
231 | 231 |
|
232 | 232 |
protected void checkIsMine(DataStoreParameters dsp) { |
233 | 233 |
if (!(dsp instanceof JDBCStoreParameters)) { |
234 |
// FIXME Excpetion ???
|
|
234 |
// FIXME Exception ???
|
|
235 | 235 |
throw new IllegalArgumentException( |
236 | 236 |
"not instance of FilesystemStoreParameters"); |
237 | 237 |
} |
238 | 238 |
|
239 |
try { |
|
240 |
dsp.validate();
|
|
241 |
} catch (ValidateDataParametersException e) { |
|
242 |
throw new IllegalArgumentException("check parameters", e);
|
|
243 |
} |
|
239 |
// try {
|
|
240 |
// dsp.validate();
|
|
241 |
// } catch (ValidateDataParametersException e) {
|
|
242 |
// throw new IllegalArgumentException("check parameters", e);
|
|
243 |
// }
|
|
244 | 244 |
|
245 | 245 |
JDBCServerExplorerParameters parameters = getJDBCParameters(); |
246 | 246 |
|
247 | 247 |
JDBCStoreParameters pgp = (JDBCStoreParameters) dsp; |
248 | 248 |
if (!compare(pgp.getHost(), parameters.getHost())) { |
249 |
// FIXME Excpetion ???
|
|
250 |
throw new IllegalArgumentException("worng explorer: Host (mine: "
|
|
249 |
// FIXME Exception ???
|
|
250 |
throw new IllegalArgumentException("wrong explorer: Host (mine: "
|
|
251 | 251 |
+ parameters.getHost() + " other:" + pgp.getHost() + ")"); |
252 | 252 |
} |
253 | 253 |
if (!compare(pgp.getPort(), parameters.getPort())) { |
254 |
// FIXME Excpetion ???
|
|
255 |
throw new IllegalArgumentException("worng explorer: Port (mine: "
|
|
254 |
// FIXME Exception ???
|
|
255 |
throw new IllegalArgumentException("wrong explorer: Port (mine: "
|
|
256 | 256 |
+ parameters.getPort() + " other:" + pgp.getPort() + ")"); |
257 | 257 |
} |
258 | 258 |
if (!compare(pgp.getDBName(), parameters.getDBName())) { |
259 |
// FIXME Excpetion ???
|
|
260 |
throw new IllegalArgumentException("worng explorer: DBName (mine: "
|
|
259 |
// FIXME Exception ???
|
|
260 |
throw new IllegalArgumentException("wrong explorer: DBName (mine: "
|
|
261 | 261 |
+ parameters.getDBName() + " other:" + pgp.getDBName() |
262 | 262 |
+ ")"); |
263 | 263 |
} |
264 | 264 |
if (parameters.getCatalog() != null) { |
265 | 265 |
// implicit catalog |
266 | 266 |
if (!compare(pgp.getCatalog(), parameters.getCatalog())) { |
267 |
// FIXME Excpetion ???
|
|
267 |
// FIXME Exception ???
|
|
268 | 268 |
throw new IllegalArgumentException( |
269 |
"worng explorer: Catalog (mine: "
|
|
269 |
"wrong explorer: Catalog (mine: "
|
|
270 | 270 |
+ parameters.getCatalog() + " other:" |
271 | 271 |
+ pgp.getCatalog() + ")"); |
272 | 272 |
} |
... | ... | |
274 | 274 |
if (parameters.getSchema() != null) { |
275 | 275 |
// implicit schema |
276 | 276 |
if (!compare(pgp.getSchema(), parameters.getSchema())) { |
277 |
// FIXME Excpetion ???
|
|
277 |
// FIXME Exception ???
|
|
278 | 278 |
throw new IllegalArgumentException( |
279 |
"worng explorer: Schema (mine: "
|
|
279 |
"wrong explorer: Schema (mine: "
|
|
280 | 280 |
+ parameters.getSchema() + " other:" |
281 | 281 |
+ pgp.getSchema() + ")"); |
282 | 282 |
} |
283 | 283 |
} |
284 | 284 |
if (!compare(pgp.getJDBCDriverClassName(), parameters |
285 | 285 |
.getJDBCDriverClassName())) { |
286 |
// FIXME Excpetion ???
|
|
286 |
// FIXME Exception ???
|
|
287 | 287 |
throw new IllegalArgumentException( |
288 |
"worng explorer: JDBCDriverClassName");
|
|
288 |
"wrong explorer: JDBCDriverClassName");
|
|
289 | 289 |
} |
290 | 290 |
} |
291 | 291 |
|
Also available in: Unified diff