Problem with backup and server shutdown

Help
Alex1511
2012-11-28
2014-01-19
  • Alex1511

    Alex1511 - 2012-11-28

    Hey guys,

    iam trying to make a backup of my hsql database. But it doesn't work, because in my database.properties the modfied entry is set to yes. That means, that iam not shutting down the server correctly. But i can't figure out, how i shutdown the server correctly. I got one method for closing my connection and one to stop my server.

        public static boolean closeConnection() throws SQLException, ClassNotFoundException{
    
            if(getConnection() != null){
    
                getConnection().close();
                connectionInstance = null;
                return true;
            }
            else{
                return false;
            }
        }
        public static boolean stopServer() throws ClassNotFoundException{
    
            if(getServer() != null){
    //          getServer().stop();
                getServer().shutdown();
    //          getServer().checkRunning(false);
                serverInstance = null;
    
                return true;
            }
            else{
                return false;
            }
        }
    
     
  • Fred Toussi

    Fred Toussi - 2012-11-28

    You can backup the database without shutting the server down. See the Guide about backup.

    If you want to shutdown the server, perform the SQL statement, SHUTDOWN, on the database.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks