WFLY-1377 Handle optional resource injection