openejb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: When to set openejb.strict.interface.declaration
Date Fri, 17 Jul 2009 22:42:53 GMT
Ok the logic for business interface processing is in there and looking  
solid based on the test case I wrote and some tck feedback.

The new code seems much more clean and straight forward.  I recommend  
everyone update and take a look at the AnnotationDeployer's  
processSessionInterfaces() method and let me know what you think.  I  
can document it more while it's still fresh in my head, so do feel  
encouraged to say "what's this part about", etc.

Ivan, this seems to fix OPENEJB-1039 by my trials with the TCK, though  
I haven't run the whole thing.  Give it a try with strict mode off and  
let me know how it goes.

Still need to keep flushing out the BusinessInterfacesTest, but it's  
pretty large already.  In testing negative scenarios (i.e. illegal  
annotation usage and whatnot) I discovered a nasty bug in our  
Messages.properties support code.  Basically, escaping does not work.   
So given the three messages below, the third will not work.

1.ann.remote.noAttributes = Ambiguous @Remote() usage on bean class
2.ann.remote.noAttributes = Ambiguous @Remote() usage on bean class.   
Must list interfaces explicitly in annotation.
3.ann.remote.noAttributes = When annotating a bean class as @Remote  
with no annotation attributes, the bean must implement exactly one  
business interface, no more and no less.  List the remote interfaces  
explicitly in the annotation, such as @Remote(\{{0}\}).   
Alternatively, apply the @Remote annotation to the individual  
interfaces and remove it from the bean class.

The desired output for the third message would look something like this:

---
When annotating a bean class as @Remote with no annotation attributes,  
the bean must implement exactly one business interface, no more and no  
less.  List the remote interfaces explicitly in the annotation, such  
as @Remote({AccountProcessor.class, Warehouse.class}).  Alternatively,  
apply the @Remote annotation to the individual interfaces and remove  
it from the bean class.
---

But any attempt to escape { does not work and comes out like {{0}},  
which is not valid.  Will have to take a look.

-David



Mime
View raw message