GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.utils
Class HsqlServerBean

java.lang.Object
  extended by org.openspaces.persistency.utils.HsqlServerBean
All Implemented Interfaces:
DisposableBean, InitializingBean

public class HsqlServerBean
extends Object
implements InitializingBean, 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 Summary
HsqlServerBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void destroy()
           
 DataSource getDataSource()
           
 Properties getServerProperties()
           
 void setDataSource(DataSource dataSource)
           
 void setServerProperties(Properties serverProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlServerBean

public HsqlServerBean()
Method Detail

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 InitializingBean
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface DisposableBean

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.