org.ow2.jonas.db.hsqldb
Class HsqlDBServiceImpl

java.lang.Object
  extended by org.ow2.jonas.lib.management.javaee.ManagedObject
      extended by org.ow2.jonas.lib.service.AbsServiceImpl
          extended by org.ow2.jonas.db.base.AbsDBServiceImpl
              extended by org.ow2.jonas.db.hsqldb.HsqlDBServiceImpl
All Implemented Interfaces:
org.ow2.jonas.db.base.AbsDBServiceImplMBean, org.ow2.jonas.db.DBService, org.ow2.jonas.service.Service

public class HsqlDBServiceImpl
extends org.ow2.jonas.db.base.AbsDBServiceImpl
implements org.ow2.jonas.db.DBService, org.ow2.jonas.db.base.AbsDBServiceImplMBean

Embeds the HSQL database in JOnAS.

Author:
Florent Benoit

Constructor Summary
HsqlDBServiceImpl()
           
 
Method Summary
protected  void doStart()
          Start the service.
protected  void doStop()
          Stop the service.
protected  void initServer(List<org.ow2.jonas.db.base.User> users, String databaseName, String portNumber)
          Create a database with the specified arguments.
 
Methods inherited from class org.ow2.jonas.db.base.AbsDBServiceImpl
getLogger, setDbname, setPort, setUsers
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
convertToList, doInit, getDomainName, getJonasServerName, getName, getSequenceNumber, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Constructor Detail

HsqlDBServiceImpl

public HsqlDBServiceImpl()
Method Detail

initServer

protected void initServer(List<org.ow2.jonas.db.base.User> users,
                          String databaseName,
                          String portNumber)
                   throws org.ow2.jonas.service.ServiceException
Create a database with the specified arguments.

Specified by:
initServer in class org.ow2.jonas.db.base.AbsDBServiceImpl
Parameters:
users - user/password (separated by a ":")
databaseName - name of the database
portNumber - port number of the database
Throws:
org.ow2.jonas.service.ServiceException

doStart

protected void doStart()
                throws org.ow2.jonas.service.ServiceException
Start the service.

Overrides:
doStart in class org.ow2.jonas.db.base.AbsDBServiceImpl
Throws:
org.ow2.jonas.service.ServiceException - if the startup failed.

doStop

protected void doStop()
               throws org.ow2.jonas.service.ServiceException
Stop the service.

Overrides:
doStop in class org.ow2.jonas.db.base.AbsDBServiceImpl
Throws:
org.ow2.jonas.service.ServiceException - if the stop failed.


Copyright © 2011 OW2 Consortium. All Rights Reserved.