Package org.geotools.data

Examples of org.geotools.data.DataStore.dispose()


            catch (Throwable t){
                return t.getLocalizedMessage(); // We cannot connect because of this ...
            }
            finally {
                if( datastore != null){
                    datastore.dispose();
                }
            }
        }
        return null; // apparently we can connect
    }
View Full Code Here


            LOGGER.log(Level.WARNING,
                "Error while writing featuretype '" + schema.getTypeName() + "' to shapefile.", ioe);
            throw new ServiceException(ioe);
        } finally {
            if(dstore != null) {
                dstore.dispose();
            }
        }
       
        return file;
    }
View Full Code Here

                JDBCUtils.close(st);
                JDBCUtils.close(conn, null, null);
                // very important, or we'll leak connection pools during
                // execution
                if (ds != null)
                    ds.dispose();
                if (reader != null)
                    reader.close();
            }
        }
View Full Code Here

      }
    } catch (Exception ex) {
      ex.printStackTrace();
    } finally {
      if (ds != null) {
        ds.dispose();
      }
      if (succeeed) {
        JOptionPane.showMessageDialog(this, "Succeed!");
      } else {
        JOptionPane.showMessageDialog(this, "Failed!");
View Full Code Here

                        "No features types were found in the specified database.");
            }
        } catch (GeoToolsOpException e) {
            throw new CommandFailedException("Unable to get feature types from the database.", e);
        } finally {
            dataStore.dispose();
            cli.getConsole().flush();
        }
    }
}
View Full Code Here

                        "No features types were found in the specified database.");
            }
        } catch (GeoToolsOpException e) {
            throw new CommandFailedException("Unable to get feature types from the database.");
        } finally {
            dataStore.dispose();
            cli.getConsole().flush();
        }
    }

}
View Full Code Here

                }
            } catch (IOException e) {
                throw new IllegalStateException("Cannot connect to database: " + e.getMessage(), e);
            } finally {
                if (dataStore != null) {
                    dataStore.dispose();
                }
            }
        }
    }
View Full Code Here

            default:
                throw new CommandFailedException("Import failed with exception: "
                        + e.statusCode.name(), e);
            }
        } finally {
            dataStore.dispose();
            cli.getConsole().flush();
        }
    }
}
View Full Code Here

            default:
                throw new CommandFailedException("Import failed with exception: "
                        + e.statusCode.name(), e);
            }
        } finally {
            dataStore.dispose();
            cli.getConsole().flush();
        }
    }
}
View Full Code Here

                        "No features types were found in the specified database.");
            }
        } catch (GeoToolsOpException e) {
            throw new CommandFailedException("Unable to get feature types from the database.");
        } finally {
            dataStore.dispose();
            cli.getConsole().flush();
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.