Revision 28072
branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/InitializeApplicationExtension.java | ||
---|---|---|
8 | 8 |
import java.io.StringWriter; |
9 | 9 |
import java.util.Properties; |
10 | 10 |
|
11 |
import org.slf4j.Logger; |
|
12 |
import org.slf4j.LoggerFactory; |
|
13 | 11 |
import org.cresques.ProjectionLibrary; |
14 | 12 |
import org.cresques.impl.CresquesCtsLibrary; |
15 | 13 |
import org.gvsig.AppGvSigLibrary; |
... | ... | |
21 | 19 |
import org.gvsig.fmap.dal.index.spatial.gt2.Gt2IndexLibrary; |
22 | 20 |
import org.gvsig.fmap.dal.index.spatial.jsi.JSIIndexLibrary; |
23 | 21 |
import org.gvsig.fmap.dal.index.spatial.jts.JTSIndexLibrary; |
22 |
import org.gvsig.fmap.dal.resource.ResourceManager; |
|
23 |
import org.gvsig.fmap.dal.resource.exception.DisposeResorceManagerException; |
|
24 | 24 |
import org.gvsig.fmap.dal.store.dbf.DBFLibrary; |
25 | 25 |
import org.gvsig.fmap.dal.store.dxf.DXFLibrary; |
26 | 26 |
import org.gvsig.fmap.dal.store.shp.SHPLibrary; |
... | ... | |
34 | 34 |
import org.gvsig.tools.evaluator.sqljep.SQLJEPLibrary; |
35 | 35 |
import org.gvsig.tools.observer.Observer; |
36 | 36 |
import org.gvsig.tools.persistence.xmlentity.XMLEntityManager; |
37 |
import org.slf4j.Logger; |
|
38 |
import org.slf4j.LoggerFactory; |
|
37 | 39 |
|
38 | 40 |
import com.iver.andami.Launcher; |
39 | 41 |
import com.iver.andami.PluginServices; |
... | ... | |
84 | 86 |
|
85 | 87 |
projectionLibrary = new ProjectionLibrary(); |
86 | 88 |
projectionLibrary.initialize(); |
87 |
|
|
89 |
|
|
88 | 90 |
cresquesCtsLibrary = new CresquesCtsLibrary(); |
89 | 91 |
cresquesCtsLibrary.initialize(); |
90 |
|
|
92 |
|
|
91 | 93 |
// geometry api |
92 | 94 |
geometryLibrary = new GeometryLibrary(); |
93 | 95 |
geometryLibrary.initialize(); |
... | ... | |
156 | 158 |
compatLibrary.initialize(); |
157 | 159 |
SECompatLibrary compatLibraryImpl=new SECompatLibrary(); |
158 | 160 |
compatLibraryImpl.initialize(); |
159 |
|
|
161 |
|
|
160 | 162 |
addToLogInfo(); |
161 | 163 |
registerIcons(); |
162 | 164 |
|
... | ... | |
167 | 169 |
|
168 | 170 |
projectionLibrary.postInitialize(); |
169 | 171 |
cresquesCtsLibrary.postInitialize(); |
170 |
|
|
172 |
|
|
171 | 173 |
geometryLibrary.postInitialize(); |
172 | 174 |
defaultGeometryLibrary.postInitialize(); |
173 | 175 |
|
... | ... | |
191 | 193 |
appGvSigLibrary.postInitialize(); |
192 | 194 |
|
193 | 195 |
compatLibrary.postInitialize(); |
194 |
|
|
196 |
|
|
195 | 197 |
registerObservers(); |
198 |
|
|
199 |
DALLocator.getResourceManager().startResourceCollector( |
|
200 |
3 * (60 * 1000), // minutes --> miliseconds |
|
201 |
null); |
|
202 |
|
|
196 | 203 |
} |
197 | 204 |
private void registerObservers() { |
198 | 205 |
// FIXME |
... | ... | |
339 | 346 |
} |
340 | 347 |
|
341 | 348 |
public void terminate() { |
349 |
// XXX: Need a TerminateApplicationExtension ??? |
|
350 |
ResourceManager resMan = DALLocator.getResourceManager(); |
|
351 |
resMan.stopResourceCollector(); |
|
352 |
try { |
|
353 |
resMan.dispose(); |
|
354 |
} catch (DisposeResorceManagerException e) { |
|
355 |
logger.error("Exceptions at dispose Resource Manager", e); |
|
356 |
} |
|
342 | 357 |
|
343 | 358 |
super.terminate(); |
344 | 359 |
// try { |
Also available in: Unified diff