|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.resource.common.ResourceBean
bitronix.tm.resource.ehcache.EhCacheXAResourceProducer
public final class EhCacheXAResourceProducer
EHCache implementation of BTM's XAResourceProducer.
Copyright 2003-2010 Terracotta, Inc.
Method Summary | |
---|---|
void |
close()
Release this XAResourceProducer 's internal resources. |
XAStatefulHolder |
createPooledConnection(Object xaFactory,
ResourceBean bean)
Create a XAStatefulHolder that will be placed in an XAPool . |
void |
endRecovery()
Release internal resources held after call to startRecovery() . |
XAResourceHolder |
findXAResourceHolder(XAResource xaResource)
Find in the XAResourceHolder s created by this XAResourceProducer the one which this
XAResource belongs to. |
Reference |
getReference()
|
void |
init()
Initialize this XAResourceProducer 's internal resources. |
static void |
registerXAResource(String uniqueName,
XAResource xaResource)
Register an XAResource of a cache with BTM. |
void |
setFailed(boolean failed)
Mark this resource producer as failed or not. |
XAResourceHolderState |
startRecovery()
Prepare the recoverable XAResource producer for recovery. |
static void |
unregisterXAResource(String uniqueName,
XAResource xaResource)
Unregister an XAResource of a cache from BTM. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bitronix.tm.resource.common.XAResourceProducer |
---|
getUniqueName |
Method Detail |
---|
public static void registerXAResource(String uniqueName, XAResource xaResource)
uniqueName
- the uniqueName of this XAResourceProducer, usually the cache's namexaResource
- the XAResource to be registeredpublic static void unregisterXAResource(String uniqueName, XAResource xaResource)
uniqueName
- the uniqueName of this XAResourceProducer, usually the cache's namexaResource
- the XAResource to be registeredpublic XAResourceHolderState startRecovery() throws RecoveryException
XAResource
producer for recovery.
startRecovery
in interface XAResourceProducer
XAResourceHolderState
object that can be used to call recover()
.
RecoveryException
- thrown when a XAResourceHolderState
cannot be acquired.public void endRecovery() throws RecoveryException
startRecovery()
.
endRecovery
in interface XAResourceProducer
RecoveryException
- thrown when an error occured while releasing reserved resources.public void setFailed(boolean failed)
setFailed
in interface XAResourceProducer
failed
- true is the resource must be considered failed, false it it must be considered sane.public XAResourceHolder findXAResourceHolder(XAResource xaResource)
XAResourceHolder
s created by this XAResourceProducer
the one which this
XAResource
belongs to.
findXAResourceHolder
in interface XAResourceProducer
xaResource
- the XAResource
to look for.
XAResourceHolder
or null if the XAResource
does not belong to this
XAResourceProducer
.public void init()
XAResourceProducer
's internal resources.
init
in interface XAResourceProducer
public void close()
XAResourceProducer
's internal resources.
close
in interface XAResourceProducer
public XAStatefulHolder createPooledConnection(Object xaFactory, ResourceBean bean) throws Exception
XAStatefulHolder
that will be placed in an XAPool
.
createPooledConnection
in interface XAResourceProducer
xaFactory
- the vendor's resource-specific XA factory.bean
- the resource-specific bean describing the resource parameters.
XAStatefulHolder
that will be placed in an XAPool
.
Exception
- thrown when the XAStatefulHolder
cannot be created.public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |