Exemplo n.º 1
0
 protected void closeDatabase() {
   if (this.conn_ != null) {
     try {
       conn_.close();
     } catch (SQLException e) {
     }
   }
 }
Exemplo n.º 2
0
 public void endDocument() throws SAXException {
   // System.out.println("endDocument()");
   try {
     conn_.commit();
     closeDatabase();
   } catch (SQLException sqle) {
     throw new SAXException(sqle.toString());
   }
 }
Exemplo n.º 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());
   }
 }