Revision 11006 branches/v10/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialFileAdapter.java
VectorialFileAdapter.java | ||
---|---|---|
105 | 105 |
try { |
106 | 106 |
if (reference_count == 0) |
107 | 107 |
{ |
108 |
getFileDriver().open(file); |
|
108 |
//System.out.println("====" + hashCode() + " Abrir el fichero: ["+ reference_count + "]"+ file.getAbsolutePath() ); |
|
109 |
getFileDriver().open(file); |
|
109 | 110 |
|
110 | 111 |
if (!driverInitialized) { |
111 | 112 |
getFileDriver().initialize(); |
112 | 113 |
driverInitialized = true; |
113 | 114 |
} |
115 |
getRecordset().start(); |
|
114 | 116 |
} |
115 | 117 |
reference_count++; |
116 | 118 |
|
117 | 119 |
} catch (IOException e) { |
118 | 120 |
throw new DriverIOException(e); |
121 |
} catch (DriverException e) { |
|
122 |
// TODO Auto-generated catch block |
|
123 |
throw new DriverIOException(e); |
|
119 | 124 |
} |
120 | 125 |
} |
121 | 126 |
|
... | ... | |
127 | 132 |
*/ |
128 | 133 |
public synchronized void stop() throws DriverIOException { |
129 | 134 |
try { |
130 |
if (reference_count == 0)
|
|
135 |
if (reference_count == 1)
|
|
131 | 136 |
{ |
137 |
//System.out.println("====" + hashCode() + " Cerrar el fichero: ["+ reference_count + "]"+ file.getAbsolutePath() ); |
|
132 | 138 |
getFileDriver().close(); |
139 |
getRecordset().stop(); |
|
133 | 140 |
} |
134 | 141 |
else |
135 | 142 |
if (reference_count < 0) |
... | ... | |
138 | 145 |
reference_count--; |
139 | 146 |
} catch (IOException e) { |
140 | 147 |
throw new DriverIOException(e); |
148 |
} catch (DriverLoadException e) { |
|
149 |
// TODO Auto-generated catch block |
|
150 |
e.printStackTrace(); |
|
151 |
} catch (DriverException e) { |
|
152 |
// TODO Auto-generated catch block |
|
153 |
e.printStackTrace(); |
|
141 | 154 |
} |
142 | 155 |
} |
143 | 156 |
|
Also available in: Unified diff