[ 
https://issues.apache.org/jira/browse/ARIES-1341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14609981#comment-14609981
 ] 

Christian Schneider commented on ARIES-1341:
--------------------------------------------

I switched this to improvement as we have working examples. So the 
functionality is not broken. It is just not as complete as it could be.

Your are describing several things here. The ones that are clear to me are:
- only top level class scanned, super classes are not. 
I think it is a good enhancement to support that case too. As people might want 
to put the EntityManager into a parent class.
- only fields are scanned
As far as I know fields are the typical place to put the annotation. Methods 
could be implemented but I am not sure what the gain would be.
I am fine if the added complexity is not too high.
I am not sure what for example @PersistenceContext on a type would mean. So 
could you give an example of how this would work?

I do not fully understand the other two issues:
- getAnnotation will not work on the blueprint bean as it is proxied. In what 
context would you need that?
- setting persistence fields.. Again could you explain what your use case is 
there?



> JpaBeanProcessor not working in karaf
> -------------------------------------
>
>                 Key: ARIES-1341
>                 URL: https://issues.apache.org/jira/browse/ARIES-1341
>             Project: Aries
>          Issue Type: Improvement
>          Components: Blueprint, JPA
>    Affects Versions: jpa-2.0.0
>         Environment: karaf-4.0.0
>            Reporter: Michał Woś
>            Assignee: Christian Schneider
>             Fix For: jpa-2.1.0, jpa-2.0.1
>
>
> * getAnnotation() return null because annotations are proxied (com.sun.proxy).
> * only top level class is scanned. super classes are not
> * only fields are scanned whereas target of persistence annotations is: TYPE, 
> METHOD, FIELD
> * Setting persistence fields results in:
> Can not set javax.persistence.EntityManager field xxx to 
> com.sun.proxy.$Proxy37



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to