Remove a Wildfly Transaction from LOG-STORE


You may need to run these commands under following circumstances:

  • you are running a test system and testing UserTransaction API
  •  you have dropped some objects ( database , table ) and you don’t care about this XA transactions
  • your DBA has manually committed or rolled back a XA transaction  be running : COMMIT FORCE ‘Local_TranID’ or ROLLBACK FORCE  ‘Local_TranID’ via sqlplus
  • In any case be careful when running this commands as this could logically corrupt your production system very easily  !


Setup and Commands

List PREPARED transactions: 
[oracle@wls1 XA]$ cat xa.cli
ls /subsystem=transactions/log-store=log-store/transactions

[oracle@wls1 XA]$  $WILDFLY_HOME/bin/ --connect --file=xa.cli
 {"outcome" => "success"}

Try to List JNDI resources 
[standalone@localhost:9990 /]  /subsystem=transactions/log-store=log-store/transactions=0\:ffffc0a805c9\:682bf87e\:55433e74\:127:read_resource
    "outcome" => "failed",
    "failure-description" => "JBAS014884: No operation named 'read_resource' exists at address [
    (\"subsystem\" => \"transactions\"),
    (\"log-store\" => \"log-store\"),
    (\"transactions\" => \"0:ffffc0a805c9:682bf87e:55433e74:127\")
    "rolled-back" => true

Finally delete the transaction and verify transaction status  
[standalone@localhost:9990 /]  /subsystem=transactions/log-store=log-store/transactions=0\:ffffc0a805c9\:682bf87e\:55433e74\:127:delete
{"outcome" => "success"}

[oracle@wls1 XA]$ $WILDFLY_HOME/bin/ --connect --file=xa.cli
{"outcome" => "success"}


Leave a Reply

Your email address will not be published. Required fields are marked *