WAS v8.5 > Develop applications > Develop data access resources > Develop data access applications > Develop data access applications

JCA 1.6 support for annotations in RAR modules

The Java Connector Architecture (JCA) v1.6 specification adds support for Java annotations in resource archive (RAR) modules. Annotations are a means of specifying metadata, or configuration data, for a RAR module in the class files that make up the module.

Before JCA 1.6, this metadata was specified only in the deployment descriptor, but now we can specify this metadata using either a deployment descriptor or annotations. Metadata specified in annotations is merged into the deployment descriptor of a RAR module when it is updated, if the module is not marked metadata-complete in the deployment descriptor and if the module version is 1.6 or later.

The metadata-complete element defines whether the deployment descriptor for the resource adapter module is complete or whether the class files available to the module and packaged with the resource adapter should be examined for annotations that specify deployment information. If the metadata-complete is set to true, the application server deployment tool must ignore any annotations that specify deployment information, which might be present in the class files of the application. If metadata-complete is not specified, or is set to false, the deployment tool must examine the class files of the application for annotations, as specified by the JCA 1.6 Specification. If the deployment descriptor is not included, or is included but not marked metadata-complete, the deployment tool processes annotations.

Application servers must assume that metadata-complete is true for resource adapter modules with deployment descriptors that meet the requirements of JCA specification 1.5 and earlier. For a complete list of the supported annotations and their usage, consult the JCA specification.

The JCA v1.6 specification also adds support for Bean Validation constraint annotations in RAR modules. We can specify Bean Validation constraint metadata for RAR JavaBeans by decorating your classes with Bean Validation constraint annotations or by supplying XML validation descriptors. The Application Server validates the constraints of all JCA 1.6 RAR JavaBeans instances before placing them into service at run time.


Related concepts:

Bean validation in RAR modules


Related


Relational resource adapters and JCA
Configure connection factories for resource adapters within applications
Install resource adapters embedded within applications
Install a resource adapter archive
Configure resource adapters
Configure new J2C resource adapters using wsadmin.sh


Reference:

Troubleshooting bean validation in RAR modules
Options for the AdminApp object install, installInteractive, edit, editInteractive, update, and updateInteractive commands using wsadmin.sh


+

Search Tips   |   Advanced Search