-
1. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
alrubinger May 22, 2008 5:56 PM (in response to alrubinger)Note that in 2), this would already be taken care of given my suggestion to not support local/remote EJB2.x interfaces in @Local/@Remote; in Home would be the only place they could be defined.
S,
ALR -
2. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
alrubinger May 22, 2008 6:19 PM (in response to alrubinger)"ALRubinger" wrote:
Leaning towards EJB3 Proxy to test these conditions as they are EJB3 Spec Rules
I revoke that. jboss-metadata is already doing JBMETA-41 to achieve EJB3 Core Spec 3.6.2.1, so jboss-metadata has become the authority to ensure metadata is not only defined, but valid. So I'd like to see these checks in there.
S,
ALR -
3. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
wolfc May 23, 2008 10:53 AM (in response to alrubinger)Some things can not be checked in metadata, because they require the correct class loader.
For example whether a remote interface is really an interface and extends EJBObject.
This is different for the annotation meta data creator, it has classes to work with. So it can do more checks. As a post condition it should not be allowed to create invalid meta data.
I think the validations should be in jboss-metadata, but care must be taken that they should not be intertwined with code that performs a different function.
In the end, somewhere in the deployer chain something like:Set<InvalidConstraint<JBossMetaData>> violations = someValidator.validate(jbossMetaData, "ejb3");
should occur. -
4. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
emuckenhuber May 23, 2008 11:40 AM (in response to alrubinger)Well at the moment i have put some validation in the AnnotationProcessors, as there were some checks in other processors too.
Although doing those checks would lead to some regressions in the metadata test as there are some few declarations like:@Remote(Multiview21Remote.class)
Just let me know if i should enable or disable those, because i don't know if this would create more regressions somewhere else. -
5. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
alrubinger May 23, 2008 12:09 PM (in response to alrubinger)"wolfc" wrote:
Some things can not be checked in metadata, because they require the correct class loader.
I'd intended for these to be done from the context of the Annotation Processing Deployers, where the CL is available."wolfc" wrote:
In the end, somewhere in the deployer chain something like:Set<InvalidConstraint<JBossMetaData>> violations = someValidator.validate(jbossMetaData, "ejb3");
should occur.
How about:Set<InvalidConstraint<JBossMetaData>> violations = new HashSet<InvalidConstraint<JBossMetaData>>(); violations.addAll(ejb21ViewCompleteValidator.validate(jbossMetaData)); violations.addAll(validBusinessInterfaceValidator.validate(jbossMetaData)); violations.addAll(validEjb21InterfaceValidator.validate(jbossMetaData)); ...etc...
Then we can process all the validation failures and report them to the bean developer together, as opposed to failing on the first error only and hiding the rest.
S,
ALR -
6. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
alrubinger May 23, 2008 12:12 PM (in response to alrubinger)"emuckenhuber" wrote:
Just let me know if i should enable or disable those, because i don't know if this would create more regressions somewhere else.
I'm unclear as to what you'd like to enable/disable, and why the regressions would be present.
If:
1) You introduce a new check
2) The check is valid
3) This results in TestSuite regression
Then you've exposed a problem with the TestSuite and have strengthened it.
S,
ALR -
7. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
wolfc May 23, 2008 3:37 PM (in response to alrubinger)I'm assuming that 'someValidator' is a facade for all validations. :-)
-
8. Re: Validation of Complete EJB2.x Views: EJB3 or Metadata?
emuckenhuber May 26, 2008 2:59 AM (in response to alrubinger)"ALRubinger" wrote:
I'm unclear as to what you'd like to enable/disable, and why the regressions would be present.
Actually i meant doing the validation for JBMETA-41 - which results in a regression as some test provided are wrong."ALRubinger" wrote:
If:
1) You introduce a new check
2) The check is valid
3) This results in TestSuite regression
Then you've exposed a problem with the TestSuite and have strengthened it.
So i will correct that.
Thanks,
Emanuel