JBoss Community

Re: Parsing and validation

created by Stefano Maestri in IronJacamar Development - View the full discussion

Hi all,

 

I have just committed the implementation of validation for datasources metadata. You can see the patch there:

 

 

There are 2 main points I'd like to discuss and get your feedbacks:

 

  1. Validation has been implemented as method validate AND it's fired for every metadata creation (aka as part of the constructor). I think it's better to have valid metadata since we are working with immutable object at metadata level (at least in 99% of cases). Of course the method validate is public and can be fired by metadata's client too in case of metadata forced modification (forceXXX methods). Opinions?
  2. I have implemented at the moment just a validation to respect xsd specification (more or less just mandatory fields and cardinalities). But of course there are more things we could verify at code level. Some example: backGroundValidationMinutes has non sense if BackGroundValidation is false; min pool size could not be < of max_pool_size and so on. Or even more complex checking like provided className are at least valid class name. Since this validation comes very early in user experience (typically during deployment) I think a fine grained check would help a lot users avoiding hard to understand runtime exception during datasources/ra use. Of course make this fine grained check would need some extra analysis and some extra documentation, but I think we would get great benefits.

 

Feedbacks are more than welcome

bye

S.

Reply to this message by going to Community

Start a new discussion in IronJacamar Development at Community