2014-04-26 09:18:56 +00:00
|
|
|
package ConfigurationDB
|
|
|
|
|
2014-10-19 17:19:11 +00:00
|
|
|
import (
|
|
|
|
"github.com/SommerEngineering/Ocean/Log"
|
|
|
|
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
|
|
|
)
|
2014-04-26 09:18:56 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Do not use this type by your own! It is a Ocean internal type to provide a shutdown function for the configuration database.
|
|
|
|
*/
|
|
|
|
type ShutdownFunction struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
If the Ocean server is shutting down, this function is called to close the database.
|
|
|
|
*/
|
|
|
|
func (a ShutdownFunction) Shutdown() {
|
|
|
|
Log.LogShort(senderName, LM.CategoryAPP, LM.LevelWARN, LM.MessageNameSHUTDOWN, `Close now the configuration database connection.`)
|
|
|
|
db.Logout()
|
|
|
|
session.Close()
|
|
|
|
}
|