Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java @ 993:aabcca7aeb6c
Fixed datacage db scheme. add some debug output.
flys-artifacts/trunk@2426 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 31 Jul 2011 16:49:48 +0000 |
parents | 5b467bc27eda |
children | e0df86bc6d31 |
comparison
equal
deleted
inserted
replaced
992:5b467bc27eda | 993:aabcca7aeb6c |
---|---|
435 | 435 |
436 return null; | 436 return null; |
437 } | 437 } |
438 | 438 |
439 public boolean scan(ArtifactDatabase adb) { | 439 public boolean scan(ArtifactDatabase adb) { |
440 log.debug("scan"); | |
440 try { | 441 try { |
441 adb.loadAllArtifacts(this); | 442 adb.loadAllArtifacts(this); |
442 } | 443 } |
443 catch (ArtifactDatabaseException ade) { | 444 catch (ArtifactDatabaseException ade) { |
444 log.error(ade); | 445 log.error(ade); |
506 } | 507 } |
507 } | 508 } |
508 | 509 |
509 @Override | 510 @Override |
510 public void systemUp(GlobalContext context) { | 511 public void systemUp(GlobalContext context) { |
511 log.debug("systemUp"); | 512 log.debug("systemUp entered"); |
512 initialScan(context); | 513 initialScan(context); |
514 log.debug("systemUp leaved"); | |
513 } | 515 } |
514 | 516 |
515 protected void initialScan(GlobalContext context) { | 517 protected void initialScan(GlobalContext context) { |
516 log.debug("initialScan"); | 518 log.debug("initialScan"); |
517 | 519 |
538 | 540 |
539 } | 541 } |
540 | 542 |
541 protected boolean cleanDatabase() { | 543 protected boolean cleanDatabase() { |
542 | 544 |
543 return sqlExecutor.new Instance() { | 545 log.debug("cleanDatabase"); |
546 | |
547 boolean success = sqlExecutor.new Instance() { | |
544 @Override | 548 @Override |
545 public boolean doIt() throws SQLException { | 549 public boolean doIt() throws SQLException { |
550 log.debug("doIt"); | |
546 prepareStatement(SQL_DELETE_ALL_USERS); | 551 prepareStatement(SQL_DELETE_ALL_USERS); |
552 log.debug("prepareStatement"); | |
547 stmnt.execute(); | 553 stmnt.execute(); |
554 log.debug("execute"); | |
548 conn.commit(); | 555 conn.commit(); |
556 log.debug("commit"); | |
549 return true; | 557 return true; |
550 } | 558 } |
551 }.runWrite(); | 559 }.runWrite(); |
560 | |
561 log.debug("after runWrite(): " + success); | |
562 | |
563 return success; | |
552 } | 564 } |
553 | 565 |
554 | 566 |
555 @Override | 567 @Override |
556 public void systemDown(GlobalContext context) { | 568 public void systemDown(GlobalContext context) { |