You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/03/19 09:11:38 UTC

[jira] [Commented] (TAP5-2029) Copy annotations from service implementation to proxy (was JPA annotations expose implementation details in service interfaces)

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

Jochen Kemnade commented on TAP5-2029:
--------------------------------------

I just wanted to check if this is still relevant. I applied the patch and the second test succeeds with Gradle but fails in Eclipse in line 100.
{code}
Condition not satisfied:

nonAnnotatedGenSetMethod2.getAnnotation(Advise.class) != null
|                         |                           |
|                         null                        false
public java.lang.String $NonAnnotatedGenericSetServiceInterface_9473fb6e16b6.execute2(java.lang.Object)

	at ioc.specs.MethodInvocationGetAnnotationSpec.MethodAdvice.getAnnotation() and getMethod() in service advice(MethodInvocationGetAnnotationSpec.groovy:100)
{code}

> Copy annotations from service implementation to proxy (was JPA annotations expose implementation details in service interfaces)
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-2029
>                 URL: https://issues.apache.org/jira/browse/TAP5-2029
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-ioc
>    Affects Versions: 5.3.6
>            Reporter: John Coleman
>            Assignee: Thiago H. de Paula Figueiredo
>            Priority: Minor
>              Labels: month-of-tapestry
>             Fix For: 5.4
>
>         Attachments: 0001-TAP5-2029-Test-case-involving-generic-interface.patch
>
>
> The commit after and persistence context annotations are required on the service interface definition thereby exposing internal implementation details (see below example from docs). Details of implementation should be hidden at the interface level, both these annotations break the rule.
> Perhaps this code could appear in the Impl classes, or be provided in configuration somehow?
> public interface UserDAO {
>    @CommitAfter
>    @PersistenceContext(unitName = "DemoUnit")
>    void add(User user);



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