users@connector-spec.java.net

[connector-spec-users] [jsr322-experts] Usage of required-config-property and @NotNull

From: <frowe_at_us.ibm.com>
Date: Tue, 12 Mar 2013 13:16:46 +0000 (GMT)

Prior to JCA 1.6, an RA developer could use the
<required-config-property> element in ra.xml to indicate that a config
property of an ActivationSpec was required. The use of this element
type within other RA entities was not discussed in the spec and
accordingly in the XSD, the only place in which the
required-config-propertyType was used was within the activationspecType
definition. Its use was not allowed for any of the other objects like
RA, AO, CF, etc, instead they all use <config-propertyType>. With the
addition of BeanValidation capabilities to JCA 1.6, we deprecated the
<required-config-property> deployment descriptor element and
recommended using @NotNull instead. However, in doing so, there was no
limitation on the JavaBean types which could be decorated with this
annotation which corresponded to the limitation of its use on an
ActSpec as specified in the XSD. This leads to a situation where in
JCA 1.6, one can create an annotated RA for which an equivalent ra.xml
can't legally be constructed, for example, by creating a java bean
class annotated with @AdministeredObject and then annotating one of its
public fields with @NotNull. The equivalent deployment descriptor
would have a <required-config-property> element as a child of a
<adminobject> object which should fail schema validation. I believe a
clarification should be made to the 1.7 MR to correct this issue.

Fred