comparison flys-aft/src/main/java/de/intevation/aft/Sync.java @ 4090:d556e29592f5

Create new discharge tables if needed. flys-aft/trunk@3590 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 04 Jan 2012 17:59:26 +0000
parents 859b4781554a
children b20b710aa86f
comparison
equal deleted inserted replaced
4089:859b4781554a 4090:d556e29592f5
81 else { 81 else {
82 dips = fixed; 82 dips = fixed;
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 int exitCode = 0;
87 88
88 ConnectionBuilder aftConnectionBuilder = 89 ConnectionBuilder aftConnectionBuilder =
89 new ConnectionBuilder(AFT, config); 90 new ConnectionBuilder(AFT, config);
90 91
91 ConnectionBuilder flysConnectionBuilder = 92 ConnectionBuilder flysConnectionBuilder =
101 Rivers rivers = new Rivers(); 102 Rivers rivers = new Rivers();
102 rivers.sync(syncContext); 103 rivers.sync(syncContext);
103 } 104 }
104 catch (SQLException sqle) { 105 catch (SQLException sqle) {
105 log.error("syncing failed", sqle); 106 log.error("syncing failed", sqle);
107 exitCode = 1;
106 } 108 }
107 finally { 109 finally {
108 if (syncContext != null) { 110 if (syncContext != null) {
109 syncContext.close(); 111 syncContext.close();
110 } 112 }
111 } 113 }
114
115 if (exitCode != 0) {
116 System.exit(1);
117 }
112 } 118 }
113 } 119 }
114 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 120 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org