You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Mauricio Salatino <sa...@gmail.com> on 2008/01/24 15:48:42 UTC

Hi.. i have a question about annotations parser

Hi .. i wanna know in which classes open jpa parse the entity annotations?


-- 
- Salatino Mauricio -

Re: Hi.. i have a question about annotations parser

Posted by Pinaki Poddar <pp...@apache.org>.
Start looking from the following
1. org.apache.openjpa.persistence.jdbc.AnnotationPersistenceMappingParser
2. org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser

-- 
View this message in context: http://www.nabble.com/Hi..-i-have-a-question-about-annotations-parser-tp15066689p15072511.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: Hi.. i have a question about annotations parser

Posted by Mauricio Salatino <sa...@gmail.com>.
I'm asking which is the class in charge of the process of the annotations in
open JPA
which is the class that get the declaredAnnotations and then process the
class like an entity..
Thanks!


On Jan 24, 2008 2:52 PM, Michael Dick <mi...@gmail.com> wrote:

> Hi Mauricio,
>
> <short answer>
> If you've listed the classes in persistence.xml or have provided a
> mapping-file in persistence.xml then OpenJPA will only parse those files.
> Otherwise OpenJPA will scan all the classes on the classpath (with a few
> exceptions like java.lang classes) and look for Entity annotations.
> </short answer>
>
> The long answer depends on what you mean by parsing the entity
> annotations.
> If you're wondering about running any of the ant tasks, or their
> corresponding tools, then there are other ways to limit the classes that
> are
> processed. At runtime OpenJPA follows the guideline above though.
>
> Hope this helps,
>
> -Mike
>
> On Jan 24, 2008 8:48 AM, Mauricio Salatino <sa...@gmail.com> wrote:
>
> > Hi .. i wanna know in which classes open jpa parse the entity
> annotations?
> >
> >
> > --
> > - Salatino Mauricio -
> >
>



-- 
- Salatino Mauricio -

Re: Hi.. i have a question about annotations parser

Posted by Michael Dick <mi...@gmail.com>.
Hi Mauricio,

<short answer>
If you've listed the classes in persistence.xml or have provided a
mapping-file in persistence.xml then OpenJPA will only parse those files.
Otherwise OpenJPA will scan all the classes on the classpath (with a few
exceptions like java.lang classes) and look for Entity annotations.
</short answer>

The long answer depends on what you mean by parsing the entity annotations.
If you're wondering about running any of the ant tasks, or their
corresponding tools, then there are other ways to limit the classes that are
processed. At runtime OpenJPA follows the guideline above though.

Hope this helps,

-Mike

On Jan 24, 2008 8:48 AM, Mauricio Salatino <sa...@gmail.com> wrote:

> Hi .. i wanna know in which classes open jpa parse the entity annotations?
>
>
> --
> - Salatino Mauricio -
>

Re: Hi.. i have a question about annotations parser

Posted by Dain Sundstrom <da...@iq80.com>.
I don't know the answer to this question, but if you are just looking  
for quick simple annotation scanning code, I suggest you take a look  
at xbean-finder.

http://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java

This is what we use in OpenEJB and Geronimo to quickly scan large  
applications for the classes containing a specific annotation (e.g.,  
find all classes tagged with @Stateless).  It is written on top of ASM  
and is very efficient.

-dain

On Jan 24, 2008, at 6:48 AM, Mauricio Salatino wrote:

> Hi .. i wanna know in which classes open jpa parse the entity  
> annotations?
>
>
> -- 
> - Salatino Mauricio -