I see that the code does appear to work as when I print userTransaction it says: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@174edfc3 rather than null. So what does the message mean?
Which exact version of WildFly is this?
Steve Fisher wrote:
INFO [org.apache.cxf.common.injection.ResourceInjector] (MSC service thread 1-6) failed to resolve resource org.icatproject.exposed.ICAT/userTransaction
That looks a odd message since it's coming from Apache CFX and also logged at INFO level, whereas the @Resource injection should/is be managed by the EE subsystem in WildFly and as you already noticed, the @Resource is indeed injected.
Maybe asoldano would know more about that INFO log message.
It is 9.0.1.Final