|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.messaging.jms.server.recovery.MessagingXAResourceWrapper
public class MessagingXAResourceWrapper
XAResourceWrapper. Mainly from org.jboss.server.XAResourceWrapper from the JBoss AS server module The reason why we don't use that class directly is that it assumes on failure of connection the RM_FAIL or RM_ERR is thrown, but in JBM we throw XA_RETRY since we want the recovery manager to be able to retry on failure without having to manually retry
Field Summary |
---|
Fields inherited from interface javax.transaction.xa.XAResource |
---|
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Constructor Summary | |
---|---|
MessagingXAResourceWrapper(java.lang.String providerName,
java.lang.String username,
java.lang.String password)
|
Method Summary | |
---|---|
protected javax.transaction.xa.XAException |
check(javax.transaction.xa.XAException e)
Check whether an XAException is fatal. |
void |
close()
Close the connection |
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
|
protected javax.transaction.xa.XAResource |
connect()
Connect to the server if not already done so |
void |
end(javax.transaction.xa.Xid xid,
int flags)
|
protected void |
finalize()
|
void |
forget(javax.transaction.xa.Xid xid)
|
protected javax.jms.XAConnectionFactory |
getConnectionFactory()
Get the XAConnectionFactory |
javax.transaction.xa.XAResource |
getDelegate()
Get the connectionFactory XAResource |
java.lang.String |
getProviderName()
Get the providerName. |
int |
getTransactionTimeout()
|
boolean |
isSameRM(javax.transaction.xa.XAResource xaRes)
|
void |
onException(javax.jms.JMSException exception)
|
int |
prepare(javax.transaction.xa.Xid xid)
|
javax.transaction.xa.Xid[] |
recover(int flag)
|
void |
rollback(javax.transaction.xa.Xid xid)
|
void |
setProviderName(java.lang.String providerName)
Set the providerName. |
boolean |
setTransactionTimeout(int seconds)
|
void |
start(javax.transaction.xa.Xid xid,
int flags)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessagingXAResourceWrapper(java.lang.String providerName, java.lang.String username, java.lang.String password)
Method Detail |
---|
public java.lang.String getProviderName()
public void setProviderName(java.lang.String providerName)
providerName
- the providerName.public javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
commit
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
forget
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean isSameRM(javax.transaction.xa.XAResource xaRes) throws javax.transaction.xa.XAException
isSameRM
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
prepare
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
start
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid, int flags) throws javax.transaction.xa.XAException
end
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public int getTransactionTimeout() throws javax.transaction.xa.XAException
getTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean setTransactionTimeout(int seconds) throws javax.transaction.xa.XAException
setTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public void onException(javax.jms.JMSException exception)
onException
in interface javax.jms.ExceptionListener
public javax.transaction.xa.XAResource getDelegate() throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- for any problemprotected javax.transaction.xa.XAResource connect() throws java.lang.Exception
java.lang.Exception
- for any problemprotected javax.jms.XAConnectionFactory getConnectionFactory() throws java.lang.Exception
java.lang.Exception
- for any problempublic void close()
protected javax.transaction.xa.XAException check(javax.transaction.xa.XAException e) throws javax.transaction.xa.XAException
e
- the xa exception
javax.transaction.xa.XAException
- alwaysprotected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |