|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.transaction.util.xa.AbstractXAResource
org.apache.slide.common.AbstractXAServiceBase
Slide Service abstract implementation.
Field Summary | |
protected java.lang.String |
LOG_CHANNEL
|
protected org.apache.commons.transaction.util.LoggerFacade |
loggerFacade
|
protected Namespace |
namespace
Namespace. |
protected Scope |
scope
|
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Fields inherited from interface javax.transaction.Status |
STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLBACK, STATUS_NO_TRANSACTION, STATUS_PREPARED, STATUS_PREPARING, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK, STATUS_UNKNOWN |
Constructor Summary | |
AbstractXAServiceBase()
|
Method Summary | |
boolean |
cacheResults()
Indicates whether or not the objects managed by this service should be cached. |
abstract void |
connect()
Connects to the underlying data source (if any is needed). |
void |
connect(CredentialsToken crdtoken)
Connects to the underlying data source (if any is needed). |
boolean |
connectIfNeeded()
Connects to the service, if we were not previously connected. |
boolean |
connectIfNeeded(CredentialsToken token)
Connects to the service, if we were not previously connected. |
abstract void |
disconnect()
Disconnects from the underlying data source. |
Logger |
getLogger()
Logger accessor. |
protected org.apache.commons.transaction.util.LoggerFacade |
getLoggerFacade()
|
void |
initialize(NamespaceAccessToken token)
Initializes service. |
abstract boolean |
isConnected()
This function tells whether or not the service is connected. |
abstract void |
reset()
Deletes service underlying data source, if possible (and meaningful). |
void |
setNamespace(Namespace namespace)
Namespace setter. |
abstract void |
setParameters(java.util.Hashtable parameters)
Initializes the service with a set of parameters. |
void |
setScope(Scope scope)
Set the scope of the store as specified in domain.xml. |
Methods inherited from class org.apache.commons.transaction.util.xa.AbstractXAResource |
addAcitveTransactionalResource, addSuspendedTransactionalResource, commit, createTransactionResource, end, forget, getActiveTransactionalResource, getCurrentlyActiveTransactionalResource, getSuspendedTransactionalResource, getTransactionalResource, includeBranchInXid, isSameRM, prepare, recover, removeActiveTransactionalResource, removeSuspendedTransactionalResource, rollback, setCurrentlyActiveTransactionalResource, start |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.transaction.xa.XAResource |
commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start |
Field Detail |
protected java.lang.String LOG_CHANNEL
protected Namespace namespace
protected Scope scope
protected org.apache.commons.transaction.util.LoggerFacade loggerFacade
Constructor Detail |
public AbstractXAServiceBase()
Method Detail |
public void setScope(Scope scope)
setScope
in interface Service
public void setNamespace(Namespace namespace)
setNamespace
in interface Service
public Logger getLogger()
getLogger
in interface Service
protected org.apache.commons.transaction.util.LoggerFacade getLoggerFacade()
public abstract void setParameters(java.util.Hashtable parameters) throws ServiceParameterErrorException, ServiceParameterMissingException
setParameters
in interface Service
parameters
- Hashtable containing the parameters' names
and associated values
ServiceParameterErrorException
- Incorrect service parameter
ServiceParameterMissingException
- Service parameter missingpublic void connect(CredentialsToken crdtoken) throws ServiceConnectionFailedException
connect
in interface Service
crdtoken
- the slide token containing e.g. the credential
ServiceConnectionFailedException
- Connection failedpublic abstract void connect() throws ServiceConnectionFailedException
connect
in interface Service
ServiceConnectionFailedException
- Connection failedpublic abstract void disconnect() throws ServiceDisconnectionFailedException
disconnect
in interface Service
ServiceDisconnectionFailedException
- Disconnection failedpublic void initialize(NamespaceAccessToken token) throws ServiceInitializationFailedException
initialize
in interface Service
token
- Namespace access token, needed if the service needs to
access objects or data within the namespace during its initialization
ServiceInitializationFailedException
- May throw an exception
if the service has already been initialized beforepublic abstract void reset() throws ServiceResetFailedException
reset
in interface Service
ServiceResetFailedException
- Reset failedpublic abstract boolean isConnected() throws ServiceAccessException
isConnected
in interface Service
ServiceAccessException
- Service access errorpublic boolean connectIfNeeded(CredentialsToken token) throws ServiceConnectionFailedException, ServiceAccessException
connectIfNeeded
in interface Service
token
- the Credeantials token containing e.g. the credential
ServiceAccessException
- Unspecified service access error
ServiceConnectionFailedException
- Connection failedpublic boolean connectIfNeeded() throws ServiceConnectionFailedException, ServiceAccessException
connectIfNeeded
in interface Service
ServiceAccessException
- Unspecified service access error
ServiceConnectionFailedException
- Connection failedpublic boolean cacheResults()
cacheResults
in interface Service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |