Class HsqlServerBean

java.lang.Object
org.openspaces.persistency.utils.HsqlServerBean
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public class HsqlServerBean extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Bean that will start an instance of an HSQL database. This class is primarily intended to be used in demo applications. It allows for a self contained distribution including a database instance. The DataSource reference is necessary for proper shutdown. This is an example of a bean configuration:
     <bean id="dataBase" class="org.openspaces.persistency.utils.HsqlServerBean"
 singleton="true" lazy-init="false">
         <property name="dataSource"><ref local="dataSource"/></property>
         <property name="serverProperties">
             <props>
                 <prop key="server.port">9101</prop>
                 <prop key="server.database.0">webapps/myapp/db/test</prop>
                 <prop key="server.dbname.0">test</prop>
             </props>
         </property>
     </bean>
 
See Also:
  • Server
  • Constructor Details

    • HsqlServerBean

      public HsqlServerBean()
  • Method Details

    • getServerProperties

      public Properties getServerProperties()
    • setServerProperties

      public void setServerProperties(Properties serverProperties)
    • getDataSource

      public DataSource getDataSource()
    • setDataSource

      public void setDataSource(DataSource dataSource)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean