-
1. Re: Pure JPA Persistense Layer
afontes Feb 5, 2007 11:27 AM (in response to afontes)What a terrible misspelled subject. Can' edit post... :(
-
2. Re: Pure JPA Persistense Layer
norman.richards Feb 5, 2007 11:42 AM (in response to afontes)You can do all the Seam configuration in XML, but I don't know of any way to express the hibernate validation annotations outside of the class. (I don't know that it isn't possible either)
Just a side note - the annotations do not need to be present at runtime to use your class. If you declare @Length and it isn't available at runtime, your class will simply not have that metadata. -
3. Re: Pure JPA Persistense Layer
afontes Feb 5, 2007 11:59 AM (in response to afontes)Thank you, Norman!
Which XML can I use to define seam configuration? components.xml? Is there any example that shows this?
Augusto -
4. Re: Pure JPA Persistense Layer
norman.richards Feb 5, 2007 12:06 PM (in response to afontes)Yes. components.xml can be used to declare components that don't have an @Name annotation.
Oh, I did think of one other option, though I like it even less. You could also use JBoss AOP to add the annotations to the classes at runtime. We don't have an example of that, but the AOP guys do have examples of weaving annotations into classes.