If my memory serves me right, we were concerned that other tx manager would not like the padding zeros. Or there was a tx manager (Informix???) that did not like the padding. It's been too long, sorry...
I wonder if JBoss Group now has resources to test this with different tx managers.
I think whether or not to pad needs to happen at the JCA level. That the XAResource interface must be wrapped and when prepare or commit is called a new Xid should be created based on whether padding should be done or not. We will need the same for XAResource.recover as different XAResources require different flags here.