[jboss-user] [JCA Development] - moving validate capability to metadata

Stefano Maestri do-not-reply at jboss.com
Fri Jul 16 09:25:38 EDT 2010

Stefano Maestri [http://community.jboss.org/people/maeste] created the discussion

"moving validate capability to metadata"

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

Hi guys,

during re-design of our metadata I've seen validate methods in current org.jboss.jca.common.metadata.Metadata. This class isn't at the moment a metadata itself, but it'd more or less a metadataFactory where this utility methods have been added.
I think we can move validate capability into metadatas itself, adding to our new JCAMetadata interface the method "public void validate() throws ValidateException".
Moreover we can change, during this refactoring, a bit the validation control flow, adding intead of the previous proposed above to JCAMetadata the method:
"public ValidationStatus validate();"
where ValidationStatus is a simple pojo with 2 member: boolean valid; List<String> validationErrors;

In practice I'm saying to move validation strategies as closer as possible to the object to validate and don't use exception to control the flow.

If you'll agree I'll open a Jira linked to JBJCA-385 and I'll take care of this one too.



Reply to this message by going to Community

Start a new discussion in JCA Development at Community

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

More information about the jboss-user mailing list