code:     public boolean createDB(String dbName, PortletRequest request) {
  
          // ensure there are no illegal chars in DB name
          InputUtils.validateSafeInput(dbName);
  
          Connection conn = null;
          try {
              conn = DerbyConnectionUtil.getDerbyConnection(dbName,
                      DerbyConnectionUtil.CREATE_DB_PROP);
              portlet.addInfoMessage(request, portlet.getLocalizedString(request, "sysdb.infoMsg01", dbName));
              return true;
          } catch (Throwable e) {
              portlet.addErrorMessage(request, portlet.getLocalizedString(request, "sysdb.errorMsg01"), e.getMessage());
              return false;
          } finally {
              // close DB connection
              try {
                  if (conn != null) {
                      conn.close();
                  }
              } catch (SQLException e) {
                  portlet.addErrorMessage(request, portlet.getLocalizedString(request, "sysdb.errorMsg02"), e.getMessage());
              }
          }        
      }
  
  