private static class SimpleXAResourceProducer implements XAResourceProducer {
private static final long serialVersionUID = 1L;
private transient Map<XAResource, XAResourceHolder> xaresHolders = createXAResHoldersMap();
private static final Map<XAResource, XAResourceHolder> createXAResHoldersMap() {
return new MapMaker().weakKeys().weakValues().makeComputingMap(
new Function<XAResource, XAResourceHolder>() {
public XAResourceHolder apply(XAResource xares) {
return createResHolder(xares);
}
}