You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2007/06/14 19:28:16 UTC

Validation work

I'm doing some work on our ejb app validation code so we can get the  
new rules for EJB3 in there.  Mostly I'm trying to refactor the  
existing code to use the JAXB tree we have instead of the existing  
abstraction which we no longer need and is pretty limited.  The idea  
being once this part is done the writing of validation rules can be  
divided up and we can all jump in as we have time.

So far the list of unimplemented rules are:

   [OPENEJB-453] Validation for EJB 3.0 beans
     [OPENEJB-454] Validation: Check that @Remote hasn't been used to  
point to an EJBHome or EJBObject interface
     [OPENEJB-455] Validation: Check that @Local hasn't been used to  
point to an EJBLocalHome or EJBLocalObject interface
     [OPENEJB-470] Validation: Check that interface annotated @Local  
or @Remote isn't annotated conversely in parent interface
     [OPENEJB-526] Validation: Check for incorrect use of injection- 
target-name
     [OPENEJB-527] Validation: Warn on unused interceptors
     [OPENEJB-535] Validation: beans implementing  
javax.ejb.SessionBean also using lifecycle annotations
     [OPENEJB-536] Validation: AroundInvoke signature
     [OPENEJB-537] Validation: AppClients using non-static annotations
     [OPENEJB-538] Validation: Stateful pojos with Home interfaces  
have init-method(s)
     [OPENEJB-552] Validation: EjbName used in InterceptorBinding is  
correct
     [OPENEJB-571] Validation: @PersistenceContext name is specified
     [OPENEJB-572] Validation: @PersistenceUnit name is specified
     [OPENEJB-574] Validation: XML transaction attributes to beans,  
interfaces or methods that do not exist
     [OPENEJB-575] Validation: XML method permissions to beans,  
interfaces, or methods that do not exist
     [OPENEJB-577] Validation: @Resource name for env-entry points to  
declared value

If you've spent some time in the spec and see anything not listed,  
feel free to add more.  I haven't done it yet for the EJB3 spec, but  
in prior specs I just searched for the word "must" which usually  
brings you right to some rules.

-David


Re: Validation work -- can you help translate?

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/20/07, David Blevins <da...@visi.com> wrote:

> Anyone want to start translating the messages?   These two files
> could really use some translating:

Count me in for a Polish translation (native) and German (basic, no
technical terms so far) and...English typo hunting.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: Validation work -- can you help translate?

Posted by David Blevins <da...@visi.com>.
On Jun 26, 2007, at 2:14 PM, David Blevins wrote:
> We should be able to dig in to the above list now.  Ideally we can  
> get a few of them in so users have at least some protection on  
> their EJB 3.0 apps and then move ourselves into release mode.

Ok. Got some of our list done.  These are now in:

OPENEJB-526: Validation: Check for incorrect use of injection-target- 
name
OPENEJB-536: Validation: AroundInvoke signature
OPENEJB-552: Validation: EjbName used in InterceptorBinding is correct
OPENEJB-612: Validation: EjbName used in method-based InterceptorBinding
OPENEJB-574: Validation: XML transaction attributes to beans that do  
not exist
OPENEJB-575: Validation: XML method permissions to beans that do not  
exist
OPENEJB-613: Validation: PreDestroy callback signature is correct
OPENEJB-614: Validation: PostConstruct callback signature is correct
OPENEJB-615: Validation: PrePassivate callback signature is correct
OPENEJB-616: Validation: PostActivate callback signature is correct
OPENEJB-617: Validation: Warn on unsupported service-refs

Still writing i18n messages for many of these.

Anyone want to start translating the messages?   These two files  
could really use some translating:

Deploy tool - http://svn.apache.org/repos/asf/openejb/trunk/openejb3/ 
container/openejb-core/src/main/resources/org/apache/openejb/config/ 
Messages.properties
Validation - http://svn.apache.org/repos/asf/openejb/trunk/openejb3/ 
container/openejb-core/src/main/resources/org/apache/openejb/config/ 
rules/Messages.properties

And for the record, what languages does everyone speak -- so we know  
who to bug in the future ;)

Primary for me is English (obviously) and I speak Spanish, though  
I've written about two pages of spanish in my entire life and I don't  
know any tech terms in Spanish.  I could do some Spanish versions but  
they'll be quite terrible -- hoping someone else could step up here.   
I know Jeff speaks spanish, maybe between the two of us we could  
figure something out.  A native speaker would be better, though.

-David



Re: Validation work

Posted by David Blevins <da...@visi.com>.
On Jun 14, 2007, at 10:28 AM, David Blevins wrote:

> I'm doing some work on our ejb app validation code so we can get  
> the new rules for EJB3 in there.  Mostly I'm trying to refactor the  
> existing code to use the JAXB tree we have instead of the existing  
> abstraction which we no longer need and is pretty limited.  The  
> idea being once this part is done the writing of validation rules  
> can be divided up and we can all jump in as we have time.
>
> So far the list of unimplemented rules are:
>
>   [OPENEJB-453] Validation for EJB 3.0 beans
>     [OPENEJB-454] Validation: Check that @Remote hasn't been used  
> to point to an EJBHome or EJBObject interface
>     [OPENEJB-455] Validation: Check that @Local hasn't been used to  
> point to an EJBLocalHome or EJBLocalObject interface
>     [OPENEJB-470] Validation: Check that interface annotated @Local  
> or @Remote isn't annotated conversely in parent interface
>     [OPENEJB-526] Validation: Check for incorrect use of injection- 
> target-name
>     [OPENEJB-527] Validation: Warn on unused interceptors
>     [OPENEJB-535] Validation: beans implementing  
> javax.ejb.SessionBean also using lifecycle annotations
>     [OPENEJB-536] Validation: AroundInvoke signature
>     [OPENEJB-537] Validation: AppClients using non-static annotations
>     [OPENEJB-538] Validation: Stateful pojos with Home interfaces  
> have init-method(s)
>     [OPENEJB-552] Validation: EjbName used in InterceptorBinding is  
> correct
>     [OPENEJB-571] Validation: @PersistenceContext name is specified
>     [OPENEJB-572] Validation: @PersistenceUnit name is specified
>     [OPENEJB-574] Validation: XML transaction attributes to beans,  
> interfaces or methods that do not exist
>     [OPENEJB-575] Validation: XML method permissions to beans,  
> interfaces, or methods that do not exist
>     [OPENEJB-577] Validation: @Resource name for env-entry points  
> to declared value
>

Alright, I've reworked the validation code so we're wired right up to  
the jaxb tree that is updated during the annotation processing so we  
should now be able to implement validation for all things EJB 3.0  
using only that tree -- no need to poke around at annotations.

We should be able to dig in to the above list now.  Ideally we can  
get a few of them in so users have at least some protection on their  
EJB 3.0 apps and then move ourselves into release mode.

-David