Hmmm, I posted a wrong project at github - I've corrected it now.
The XA Resource is at https://github.com/maxant/share/blob/master/resourceadapterdemo/SAPConnector/connectorModule/ch/maxant/jca_demo/sapresourceadapter/XASAPResource.java
The XASAPResource isn't explicitly used, rather line 44 of https://github.com/maxant/share/blob/master/resourceadapterdemo/SAPTestClient/src/ch/maxant/jca_demo/client/SomeServiceThatCallsSAP.java creates an SAPConnection from the injected factory. JBoss creates the XASAPResource by calling the getXAResource method of the SAPManagedConnection class. Logs show that this seems to work correctly, at least the way that I expected it to.