Class HSQLDBServer

java.lang.Object
com.broadleafcommerce.autoconfigure.HSQLDBServer
All Implemented Interfaces:
org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle

public class HSQLDBServer extends Object implements org.springframework.context.SmartLifecycle
Adapted from https://www.javacodegeeks.com/2012/11/embedding-hsqldb-server-instance-in-spring.html by Allen Chee
Author:
Jeff Fischer
  • Field Details

    • props

      protected org.hsqldb.persist.HsqlProperties props
    • server

      protected org.hsqldb.Server server
    • serverThread

      protected Thread serverThread
  • Constructor Details

    • HSQLDBServer

      public HSQLDBServer(HSQLDBProperties autoProps, org.springframework.core.env.Environment environment)
  • Method Details

    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • stop

      public void stop(Runnable runnable)
      Specified by:
      stop in interface org.springframework.context.SmartLifecycle
    • clearState

      protected void clearState(HSQLDBProperties autoProps, org.springframework.core.env.Environment environment)