def open(user=nil, password=nil)
      raise ArgumentError.new("Database open requires an execution block") unless block_given?
      raise DatabaseError.new("The caRuby application database is already in use.") if open?
      # reset the execution timers
      persistence_services.each { |svc| svc.timer.reset }
      # Start the session.
      start_session(user, password)
      # Call the block and close when done.
      yield(self) ensure close
    end
def open(user=nil, password=nil)
      raise ArgumentError.new("Database open requires an execution block") unless block_given?
      raise DatabaseError.new("The caRuby application database is already in use.") if open?
      # reset the execution timers
      persistence_services.each { |svc| svc.timer.reset }
      # Start the session.
      start_session(user, password)
      # Call the block and close when done.
      yield(self) ensure close
    end
Calls the block given to this method with this database as an argument, and closes the
 database when done.

 @param [String, nil] user the application login user
 @param [String, nil] password the application login password
 @yield [database] the operation to perform on the database
 @yieldparam [Database] database self