I've made some further discoveries:
1. The problem is intermittent. It does work some of the time.
2. When it doesn't work, the <resourceadapter-class> is not present in the CMD passed to ParsedRaDeploymentProcessor. Here's an example where we can see there is no <resourceadapter-class> between <resourceadapter> and <outbound-resourceadapter>:
13:08:12,831 DEBUG [org.jboss.as.connector.deployment] (MSC service thread 1-8) ParsedRaDeploymentProcessor: CMD=<?xml version="1.0" encoding="UTF-8"?>
<connector version="1.6" metadata-complete="false">
Using a simple RA created via the codegenerator I do get this entry, e.g:
I've looked for differences between the generated code and my code and they include:
- additional third party jars in the rar.
- some inheritance in the connection objects to keep boiler plate stuff in abstract classes.
I suspect there's some kind of change in the way that 7.2.0 discovers the <resourceadapter-class> versus how it worked in 7.1.3.
Adding an ra.xml that specifies the <resourceadapter-class> resolves the problem.
I'm guessing that the presence of an abstract ResourceAdapter superclass (again used to avoid boilerplate code) is confusing Weld or whatever is doing the discovery. This super class is 'abstract' and does not have a @Connector annotation so should not be considered as a ResourceAdapter candidate.