Anyway, I'm not quite sure but I think that
ResourceReferenceshould be a holder of a resource instance. I.e. it's better to follow what WildFly does.
I figured pretty much what Martin did, it seems li
ResourceReferenceis better fit for a holder.
However, in the end it boils down to whatever works for you since the SPI isn't limiting you here.