|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.system.pm.AttributePersistenceService
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.
Field Summary | |
static java.lang.String |
DEFAULT_APM
The default AttributePersistenceManager implementation |
static boolean |
DEFAULT_DESTROY_APM_ON_STOP
The default behaviour for destroying the APM when stopping |
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
AttributePersistenceService()
Constructs a AttributePersistenceService. |
Method Summary | |
AttributePersistenceManager (src) |
apmCreate()
|
boolean |
apmExists(java.lang.String id)
|
java.lang.String[] |
apmListAll()
|
java.lang.String |
apmListAllAsString()
|
void |
apmRemove(java.lang.String id)
|
void |
apmRemoveAll()
|
boolean |
getApmDestroyOnServiceStop()
|
java.lang.String |
getAttributePersistenceManagerClass()
|
org.w3c.dom.Element |
getAttributePersistenceManagerConfig()
|
java.lang.String |
getVersionTag()
|
void |
setApmDestroyOnServiceStop(boolean apmDestroyOnStop)
|
void |
setAttributePersistenceManagerClass(java.lang.String apmClass)
|
void |
setAttributePersistenceManagerConfig(org.w3c.dom.Element apmConfig)
|
void |
setVersionTag(java.lang.String versionTag)
|
void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
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 (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_APM
public static final boolean DEFAULT_DESTROY_APM_ON_STOP
Constructor Detail |
public AttributePersistenceService()
Method Detail |
public java.lang.String getVersionTag()
public void setVersionTag(java.lang.String versionTag)
versionTag
- The versionTag to set.public java.lang.String getAttributePersistenceManagerClass()
public void setAttributePersistenceManagerClass(java.lang.String apmClass)
apmClass
- The apmClass to set.public org.w3c.dom.Element getAttributePersistenceManagerConfig()
public void setAttributePersistenceManagerConfig(org.w3c.dom.Element apmConfig)
apmConfig
- The apmConfig to set.public boolean getApmDestroyOnServiceStop()
public void setApmDestroyOnServiceStop(boolean apmDestroyOnStop)
apmDestroyOnStop
- The apmDestroyOnStop to set.public void startService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
public void stopService()
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService
in class ServiceMBeanSupport (src)
public AttributePersistenceManager (src) apmCreate()
public boolean apmExists(java.lang.String id) throws java.lang.Exception
java.lang.Exception
public void apmRemove(java.lang.String id) throws java.lang.Exception
java.lang.Exception
public void apmRemoveAll() throws java.lang.Exception
java.lang.Exception
public java.lang.String[] apmListAll() throws java.lang.Exception
java.lang.Exception
public java.lang.String apmListAllAsString() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |