当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 system API Documentation 英文版文档
AttributePersistenceService (JBoss System API) - JBoss 4.0.1 sp1 system API Documentation 英文版文档
org.jboss.system.pm
Class AttributePersistenceService
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.system.pm.AttributePersistenceService
- All Implemented Interfaces:
- AttributePersistenceServiceMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, Service, ServiceMBean
- public class AttributePersistenceService
- extends ServiceMBeanSupport
- implements AttributePersistenceServiceMBean
AttributePersistenceService
Works in conjuction with
org.jboss.mx.persistence.DelegatingPersistenceManager
that upon creation, consults this service for an
implementations of the interface
org.jboss.mx.persistence.AttributePersistenceManager
The service will instantiate and initialize the actual
persistence manager and return it whenever asked.
It also introduces the notion of a 'version', when
creating the persistent manager, so that persisted
data from different versions are kept separately.
The service can be stopped, the version can be changed
and the service re-started, resulting in a new
persistent manager being instantiated and all
XMBeans created thereafter using this instead.
So the goal is really to have a way to plug-in
external and manageable persistent managers that
that support versioning, too.
- Version:
- $Revision: 1.2 $
- Author:
- Dimitris Andreadis
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_APM
public static final String DEFAULT_APM
- The default AttributePersistenceManager implementation
- See Also:
- Constant Field Values
DEFAULT_DESTROY_APM_ON_STOP
public static final boolean DEFAULT_DESTROY_APM_ON_STOP
- The default behaviour for destroying the APM when stopping
- See Also:
- Constant Field Values
AttributePersistenceService
public AttributePersistenceService()
- Constructs a AttributePersistenceService.
getVersionTag
public String getVersionTag()
- Specified by:
getVersionTag
in interface AttributePersistenceServiceMBean
- Returns:
- Returns the versionTag.
setVersionTag
public void setVersionTag(String versionTag)
- Specified by:
setVersionTag
in interface AttributePersistenceServiceMBean
- Parameters:
versionTag
- The versionTag to set.
getAttributePersistenceManagerClass
public String getAttributePersistenceManagerClass()
- Specified by:
getAttributePersistenceManagerClass
in interface AttributePersistenceServiceMBean
- Returns:
- Returns the apmClass.
setAttributePersistenceManagerClass
public void setAttributePersistenceManagerClass(String apmClass)
- Specified by:
setAttributePersistenceManagerClass
in interface AttributePersistenceServiceMBean
- Parameters:
apmClass
- The apmClass to set.
getAttributePersistenceManagerConfig
public Element getAttributePersistenceManagerConfig()
- Specified by:
getAttributePersistenceManagerConfig
in interface AttributePersistenceServiceMBean
- Returns:
- Returns the apmConfig.
setAttributePersistenceManagerConfig
public void setAttributePersistenceManagerConfig(Element apmConfig)
- Specified by:
setAttributePersistenceManagerConfig
in interface AttributePersistenceServiceMBean
- Parameters:
apmConfig
- The apmConfig to set.
getApmDestroyOnServiceStop
public boolean getApmDestroyOnServiceStop()
- Specified by:
getApmDestroyOnServiceStop
in interface AttributePersistenceServiceMBean
- Returns:
- Returns the apmDestroyOnStop.
setApmDestroyOnServiceStop
public void setApmDestroyOnServiceStop(boolean apmDestroyOnStop)
- Specified by:
setApmDestroyOnServiceStop
in interface AttributePersistenceServiceMBean
- Parameters:
apmDestroyOnStop
- The apmDestroyOnStop to set.
startService
public void startService()
throws Exception
- Description copied from class:
ServiceMBeanSupport
- Sub-classes should override this method to provide
custum 'start' logic.
This method is empty, and is provided for convenience
when concrete service classes do not need to perform
anything specific for this state change.
- Overrides:
startService
in class ServiceMBeanSupport
- Throws:
Exception
stopService
public void stopService()
- Description copied from class:
ServiceMBeanSupport
- Sub-classes should override this method to provide
custum 'stop' logic.
This method is empty, and is provided for convenience
when concrete service classes do not need to perform
anything specific for this state change.
- Overrides:
stopService
in class ServiceMBeanSupport
apmCreate
public org.jboss.mx.persistence.AttributePersistenceManager apmCreate()
- Specified by:
apmCreate
in interface AttributePersistenceServiceMBean
apmExists
public boolean apmExists(String id)
throws Exception
- Specified by:
apmExists
in interface AttributePersistenceServiceMBean
- Throws:
Exception
apmRemove
public void apmRemove(String id)
throws Exception
- Specified by:
apmRemove
in interface AttributePersistenceServiceMBean
- Throws:
Exception
apmRemoveAll
public void apmRemoveAll()
throws Exception
- Specified by:
apmRemoveAll
in interface AttributePersistenceServiceMBean
- Throws:
Exception
apmListAll
public String[] apmListAll()
throws Exception
- Specified by:
apmListAll
in interface AttributePersistenceServiceMBean
- Throws:
Exception
apmListAllAsString
public String apmListAllAsString()
throws Exception
- Specified by:
apmListAllAsString
in interface AttributePersistenceServiceMBean
- Throws:
Exception
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.