Using Resource Adapters With Contexts and Dependency Injection for the Java EE Platform (CDI)
To enable a resource adapter for CDI, provide a beans.xml file in the META-INF directory of the packaged archive of the resource adapter. For more information about beans.xml, see Configuring a CDI Application.
All classes in the resource adapter are available for injection. All classes in the resource adapter can be CDI managed beans except for the following classes:
Resource adapter beans: These beans are classes that are annotated with the javax.resource.spi.Connector annotation or are declared as corresponding elements in the resource adapter deployment descriptor, ra.xml.
Managed connection factory beans: These beans are classes that are annotated with the javax.resource.spi.ConnectorDefinition annotation or the javax.resource.spi.ConnectorDefinitions annotation or are declared as corresponding elements in ra.xml.
Activation specification beans: These beans are classes that are annotated with the javax.resource.spi.Activation annotation or are declared as corresponding elements in ra.xml.
Administered object beans: These beans are classes that are annotated with the javax.resource.spi.AdministeredObject annotation or are declared as corresponding elements in ra.xml.



