org.objectweb.jonas.db
Class AbsDBServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.service.AbsServiceImpl
org.objectweb.jonas.db.AbsDBServiceImpl
- All Implemented Interfaces:
- javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean, 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
Method Summary |
protected void |
doInit(javax.naming.Context ctx)
Initialize the service. |
protected void |
doStart()
Start the service. |
protected void |
doStop()
Stop the service. |
static org.objectweb.util.monolog.api.Logger |
getLogger()
|
protected abstract void |
initServer(java.util.List users,
java.lang.String databaseName,
java.lang.String portNumber)
Create a database with the specified arguments. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
handleNotification, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbsDBServiceImpl
public AbsDBServiceImpl()
doInit
protected void doInit(javax.naming.Context ctx)
throws ServiceException
- Initialize the service.
- Specified by:
doInit
in class AbsServiceImpl
- Parameters:
ctx
- the configuration context of the service.
- Throws:
ServiceException
- if the initialization failed.
initServer
protected abstract void initServer(java.util.List users,
java.lang.String databaseName,
java.lang.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.