[jboss-user] [IronJacamar] - Bean Validation

Stan Brown do-not-reply at jboss.com
Fri Nov 19 23:50:08 EST 2010


Stan Brown [http://community.jboss.org/people/traffic] created the discussion

"Bean Validation"

To view the discussion, visit: http://community.jboss.org/message/572065#572065

--------------------------------------------------------------
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
    xmlns=" http://jboss.org/xml/ns/javax/validation/configuration http://jboss.org/xml/ns/javax/validation/configuration"
    xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=" http://jboss.org/xml/ns/javax/validation/configuration 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 http://jboss.org/xml/ns/javax/validation/configuration"
    xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=" http://jboss.org/xml/ns/javax/validation/configuration 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
[http://community.jboss.org/message/572065#572065]

Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101119/b4fa83e7/attachment.html 


More information about the jboss-user mailing list