Package org.openspaces.persistency.utils
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddestroy()voidsetDataSource(DataSource dataSource) voidsetServerProperties(Properties serverProperties)
-
Constructor Details
-
HsqlServerBean
public HsqlServerBean()
-
-
Method Details
-
getServerProperties
-
setServerProperties
-
getDataSource
-
setDataSource
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-