For recovery, you need JBossTS. In the example code there's a skeleton of an XAResource you may find useful.
Is it ok to implement an XAResource and having the recovery for it based on TXOJ? I'm thinking of a class extending com.arjuna.ats.txoj.LockManager and implementing javax.transaction.xa.XAResource.
Are any known issues (eg. performace) with this approach ?