Пример #1
0
 protected void closeDatabase() {
   if (this.conn_ != null) {
     try {
       conn_.close();
     } catch (SQLException e) {
     }
   }
 }
Пример #2
0
 public void endDocument() throws SAXException {
   // System.out.println("endDocument()");
   try {
     conn_.commit();
     closeDatabase();
   } catch (SQLException sqle) {
     throw new SAXException(sqle.toString());
   }
 }
Пример #3
0
 protected void openDatabase() throws LoadException {
   try {
     conn_ =
         DriverManager.getConnection("jdbc:postgresql://localhost/transmem", "tm", "yi4ku4wh3");
     conn_.setAutoCommit(false);
   } catch (SQLException se) {
     throw new LoadException("SQLException occurred: " + se.getMessage());
   }
 }