Using Resource Adapters with Contexts and Dependency Injection for Java EE (CDI)
Java Platform, Enterprise Edition (Java EE) 8
The Java EE Tutorial

Previous Next Contents

Using Resource Adapters with Contexts and Dependency Injection for Java EE (CDI)

Do not specify the following classes in the resource adapter as CDI managed beans (that is, do not inject them), because the behavior of these classes as CDI managed beans has not been portably defined.

  • 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.

Other types of classes in the resource adapter can be CDI managed beans and will behave in a portable manner.


Previous Next Contents
Oracle Logo  Copyright © 2017, Oracle and/or its affiliates. All rights reserved.