openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1382) make org.apache.openjpa.persistence.meta.AnnotationProcessor6 as service
Date Mon, 16 Nov 2009 17:33:39 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778406#action_12778406
] 

Pinaki Poddar commented on OPENJPA-1382:
----------------------------------------

Hi,
  The option to plug meta-data generator tool as a service has been considered. But it was
not activated it because we did not know how the users will react if pure javac compilation
with OpenJPA library in compiler classpath starts generating a bunch of MyEntity_.java files.

   Our assumption is only a handful of brave users will start experimenting with new Criteria
API and a subset of them will use the typesafe version that requires these automatically generated
canonical classes. That is why, the automatic generation is not activated as service.

  But one is always wrong in making any assumption on usage pattern :) 
  


  About location of the generated sources:
   Our first preference was to generate the new MyEnity_.java files in the same directory
as in MyEntity.java, by default. 
   But it is not obvious how to determine the directory location of a *.java files in the
context an AnnotationProcessor is invoked. Nor the ways to access the javac options such as
-sourcepath etc. 
   After a  discussion in this regard [1] and some basic experiments, I concluded that the
location of MyEntity.java can only be determined with a specialized API in Sun JDK. Based
on that observation, the default location of the generated files are current directory (for
non-Sun JDK) and the directory of the original source for Sun JDK.


[1] http://forums.sun.com/thread.jspa?threadID=5398594&tstart=0

> make org.apache.openjpa.persistence.meta.AnnotationProcessor6 as service
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-1382
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1382
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: integration, tooling
>    Affects Versions: 2.0.0-M3
>         Environment: windows XP,sun jdk6
>            Reporter: zhouyanming
>            Assignee: Pinaki Poddar
>             Fix For: 2.0.0
>
>
> please add a file named "javax.annotation.processing.Processor" to META-INF/services
> file content is org.apache.openjpa.persistence.meta.AnnotationProcessor6
> otherwise we need specific classname use -processor argument
> reduce
> javac -processorpath openjpa-all-2.0.0-SNAPSHOT.jar -processor org.apache.openjpa.persistence.meta.AnnotationProcessor6
*.java
> to
> javac -processorpath openjpa-all-2.0.0-SNAPSHOT.jar  *.java

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message