It doesn't handle it, and the "1 phase commit optimization" doesn't work IMO since there is no way to recover from a failure between the time the single 1pc resource commits or rollbacks and the time the tm logs the participants.
What we do is ignore the prepare phase on any 1pc-only resource manager. I used to log a warning every time this happened but I got too many complaints. The code is in the connector package in org.jboss.resource.connectionmanager.TxConnectionManager in the Local connection event listener class.
Thanks for the pointer. Just to be clear, by "1 phase commit optimization", you're referring to the strategy of committing the one-phase resource at the end of the prepare cycle and the beginning of the commit cycle? Indeed, that's not happening here.
(I'm not sure I see how the failure you describe is different from other resource failures in the commit cycle, but that's a discussion for another time.)