org.ow2.jonas.db.base
Class AbsDBServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.db.base.AbsDBServiceImpl
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter, Service
- Direct Known Subclasses:
- HsqlDBServiceImpl
public abstract class AbsDBServiceImpl
- extends AbsServiceImpl
Abstract database service to be implemented by implementation of Java
databases.
- Author:
- Florent Benoit
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
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 ServiceException
- Start the service.
- Specified by:
doStart
in class AbsServiceImpl
- Throws:
ServiceException
- if the startup failed.
doStop
protected void doStop()
throws ServiceException
- Stop the service.
- Specified by:
doStop
in class AbsServiceImpl
- Throws:
ServiceException
- if the stop failed.
getLogger
public static org.objectweb.util.monolog.api.Logger getLogger()
- Returns:
- the logger.
Copyright © 2010 OW2 Consortium. All Rights Reserved.