JBoss Community

Bean Validation

created by Stan Brown in IronJacamar - View the full discussion
I was doing some testing with ironjacamar-1.0.0.Beta3 and I noticed that the @NotNull built constraint didn't validated a configuration property that was null.  I also noticed that the ValidationMessages resource bundle is not present; do I have to provide this?
We also have some custom constraints and a custom MessageInterpolator.  The MessageInterpolator is defined in a validation.xml deployment descriptor, which is placed in the META-INF directory of the resource adapter archive.  The constraints work as intended, but our MessageInterpolator is not used to retrieve the message from our resource bundle.  In fact no message is logged.  Is it okay to place the validation.xml deployment descriptor in the rar?  The validation.xml is as follows:
<validation-config
    xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.0.xsd">
  <message-interpolator>com.unisys.coms.connector.validation.COMSMessageInterpolator</message-interpolator>
  <property name="com.unisys.coms.connector.validation.logging">Error</property>
  <property name="com.unisys.coms.connector.validation.country">US</property>
  <property name="com.unisys.coms.connector.validation.language">en</property>
</validation-config>

I was doing some testing with ironjacamar-1.0.0.Beta3 and I noticed that the @NotNull built-in constraint didn't validated a configuration property that was null.  I also noticed that the ValidationMessages resource bundle is not present; do I have to provide this?

 

We also have some custom constraints and a custom MessageInterpolator.  The MessageInterpolator is defined in a validation.xml deployment descriptor, which is placed in the META-INF directory of the resource adapter archive.  The constraints work as intended, but our MessageInterpolator is not used to retrieve the message from our resource bundle.  In fact no message is logged.  Is it okay to place the validation.xml deployment descriptor in the rar?  The validation.xml is as follows:

 

 

<validation-config

    xmlns="http://jboss.org/xml/ns/javax/validation/configuration"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.0.xsd">

  <message-interpolator>com.unisys.coms.connector.validation.COMSMessageInterpolator</message-interpolator>

  <property name="com.unisys.coms.connector.validation.logging">Error</property>

  <property name="com.unisys.coms.connector.validation.country">US</property>

  <property name="com.unisys.coms.connector.validation.language">en</property>

</validation-config>

Reply to this message by going to Community

Start a new discussion in IronJacamar at Community