Package org.appng.core.service
Class HsqlStarter
- java.lang.Object
-
- org.appng.core.service.HsqlStarter
-
public class HsqlStarter extends Object
Utility class responsible for starting and stopping a HSQLServer
in case appNG is configured to useDatabaseConnection.DatabaseType.HSQL
.- Author:
- Matthias Müller
-
-
Constructor Summary
Constructors Constructor Description HsqlStarter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
shutdown(org.hsqldb.Server server)
Shuts down the givenServer
, if non-null.static org.hsqldb.Server
startHsql(Properties platformProperties, String appngHome)
Starts a HSQLServer
, but only ifDatabaseConnection.DatabaseType.HSQL
is the configured type.
-
-
-
Field Detail
-
CONTEXT
public static final String CONTEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
startHsql
public static org.hsqldb.Server startHsql(Properties platformProperties, String appngHome) throws IOException
Starts a HSQLServer
, but only ifDatabaseConnection.DatabaseType.HSQL
is the configured type.- Parameters:
platformProperties
- the properties read from "/conf/appNG.properties"appngHome
- the home folder of appNG- Returns:
- a
Server
-instance, ifDatabaseConnection.DatabaseType.HSQL
is the configured type. - Throws:
IOException
- in case the database folder or hsql logfiles could not be accessed
-
shutdown
public static void shutdown(org.hsqldb.Server server)
Shuts down the givenServer
, if non-null.- Parameters:
server
- theServer
to shut down, may benull
-
-