org.ow2.jonas.db
Class AbsDBServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.db.AbsDBServiceImpl
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter, org.ow2.jonas.service.Service
- Direct Known Subclasses:
- HsqlDBServiceImpl
public abstract class AbsDBServiceImpl
- extends org.ow2.jonas.lib.service.AbsServiceImpl
Abstract database service to be implemented by implementation of Java
databases.
- Author:
- Florent Benoit
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
checkRequirements, convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isOSGi, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
| Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
initLogger, sendReconfigNotification, sendSaveNotification |
AbsDBServiceImpl
public AbsDBServiceImpl()
- Constructor initialization.
setUsers
public void setUsers(String users)
- Transform the pair user:pass into User instances.
- Parameters:
users - String of user/password (separated by a ":")
setPort
public void setPort(String port)
- Parameters:
port - Database port
setDbname
public void setDbname(String db)
- Parameters:
db - Database name
initServer
protected abstract void initServer(List<User> users,
String databaseName,
String portNumber)
- Create a database with the specified arguments. Need to be implemented by
classes extending this one.
- Parameters:
users - user/password (separated by a ":")databaseName - name of the databaseportNumber - port number of the database
doStart
protected void doStart()
throws org.ow2.jonas.service.ServiceException
- Start the service.
- Specified by:
doStart in class org.ow2.jonas.lib.service.AbsServiceImpl
- Throws:
org.ow2.jonas.service.ServiceException - if the startup failed.
doStop
protected void doStop()
throws org.ow2.jonas.service.ServiceException
- Stop the service.
- Specified by:
doStop in class org.ow2.jonas.lib.service.AbsServiceImpl
- Throws:
org.ow2.jonas.service.ServiceException - if the stop failed.
getLogger
public static org.objectweb.util.monolog.api.Logger getLogger()
- Returns:
- the logger.
Copyright © 2008 OW2 Consortium. All Rights Reserved.