[jira] [Updated] (ARIES-1885) JpaInterceptor does not properly end coordination in case of Exception

2019-01-29 Thread Christian Schneider (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARIES-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider updated ARIES-1885:
---
Fix Version/s: jpa-2.7.2

> JpaInterceptor does not properly end coordination in case of Exception
> --
>
> Key: ARIES-1885
> URL: https://issues.apache.org/jira/browse/ARIES-1885
> Project: Aries
>  Issue Type: Bug
>  Components: JPA
>Affects Versions: jpa-2.7.1
>Reporter: Nicolas Dutertry
>Assignee: Christian Schneider
>Priority: Major
> Fix For: jpa-2.7.2
>
>
> In class JpaInterceptor the method postCallWithException calls 
> Coordination.fail() but not Coordination.end():
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     ((Coordination)preCallToken).fail(ex);
>     }
> }
> {code}
>  
> However, the javadoc of Coordination.fail() states:
> {code:none}
> If this Coordination has been {@link #push() pushed} onto a thread local 
> Coordination stack, this Coordination is not removed from the stack. The 
> creator of this Coordination must still call {@link #end()} on this 
> Coordination to cause it to be removed from the thread local Coordination 
> stack.
> {code}
> This is causing issues for subsequent calls to jpa service because the 
> coordination is not removed from the stack.
> The method postCallWithException should be implemented like this:
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     Coordination coordination = (Coordination)preCallToken;
>     coordination.fail(ex);
>     coordination.end();
>     }
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (ARIES-1885) JpaInterceptor does not properly end coordination in case of Exception

2019-01-29 Thread Christian Schneider (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARIES-1885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider reassigned ARIES-1885:
--

Assignee: Christian Schneider

> JpaInterceptor does not properly end coordination in case of Exception
> --
>
> Key: ARIES-1885
> URL: https://issues.apache.org/jira/browse/ARIES-1885
> Project: Aries
>  Issue Type: Bug
>  Components: JPA
>Affects Versions: jpa-2.7.1
>Reporter: Nicolas Dutertry
>Assignee: Christian Schneider
>Priority: Major
>
> In class JpaInterceptor the method postCallWithException calls 
> Coordination.fail() but not Coordination.end():
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     ((Coordination)preCallToken).fail(ex);
>     }
> }
> {code}
>  
> However, the javadoc of Coordination.fail() states:
> {code:none}
> If this Coordination has been {@link #push() pushed} onto a thread local 
> Coordination stack, this Coordination is not removed from the stack. The 
> creator of this Coordination must still call {@link #end()} on this 
> Coordination to cause it to be removed from the thread local Coordination 
> stack.
> {code}
> This is causing issues for subsequent calls to jpa service because the 
> coordination is not removed from the stack.
> The method postCallWithException should be implemented like this:
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     Coordination coordination = (Coordination)preCallToken;
>     coordination.fail(ex);
>     coordination.end();
>     }
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (ARIES-1885) JpaInterceptor does not properly end coordination in case of Exception

2019-01-29 Thread Christian Schneider (JIRA)


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

Christian Schneider commented on ARIES-1885:


Thanks for reporting this bug. Do you want to create a PR for it or should I 
simply fix it ?

> JpaInterceptor does not properly end coordination in case of Exception
> --
>
> Key: ARIES-1885
> URL: https://issues.apache.org/jira/browse/ARIES-1885
> Project: Aries
>  Issue Type: Bug
>  Components: JPA
>Affects Versions: jpa-2.7.1
>Reporter: Nicolas Dutertry
>Priority: Major
>
> In class JpaInterceptor the method postCallWithException calls 
> Coordination.fail() but not Coordination.end():
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     ((Coordination)preCallToken).fail(ex);
>     }
> }
> {code}
>  
> However, the javadoc of Coordination.fail() states:
> {code:none}
> If this Coordination has been {@link #push() pushed} onto a thread local 
> Coordination stack, this Coordination is not removed from the stack. The 
> creator of this Coordination must still call {@link #end()} on this 
> Coordination to cause it to be removed from the thread local Coordination 
> stack.
> {code}
> This is causing issues for subsequent calls to jpa service because the 
> coordination is not removed from the stack.
> The method postCallWithException should be implemented like this:
> {code:java}
> @Override
> public void postCallWithException(ComponentMetadata cm, Method m, Throwable 
> ex, Object preCallToken) {
>     LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
> m.getName(), ex);
>     if (preCallToken != null) {
>     Coordination coordination = (Coordination)preCallToken;
>     coordination.fail(ex);
>     coordination.end();
>     }
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (ARIES-1885) JpaInterceptor does not properly end coordination in case of Exception

2019-01-29 Thread Nicolas Dutertry (JIRA)
Nicolas Dutertry created ARIES-1885:
---

 Summary: JpaInterceptor does not properly end coordination in case 
of Exception
 Key: ARIES-1885
 URL: https://issues.apache.org/jira/browse/ARIES-1885
 Project: Aries
  Issue Type: Bug
  Components: JPA
Affects Versions: jpa-2.7.1
Reporter: Nicolas Dutertry


In class JpaInterceptor the method postCallWithException calls 
Coordination.fail() but not Coordination.end():
{code:java}
@Override
public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, 
Object preCallToken) {
    LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
m.getName(), ex);
    if (preCallToken != null) {
    ((Coordination)preCallToken).fail(ex);
    }
}

{code}
 

However, the javadoc of Coordination.fail() states:
{code:none}
If this Coordination has been {@link #push() pushed} onto a thread local 
Coordination stack, this Coordination is not removed from the stack. The 
creator of this Coordination must still call {@link #end()} on this 
Coordination to cause it to be removed from the thread local Coordination stack.
{code}
This is causing issues for subsequent calls to jpa service because the 
coordination is not removed from the stack.

The method postCallWithException should be implemented like this:
{code:java}
@Override
public void postCallWithException(ComponentMetadata cm, Method m, Throwable ex, 
Object preCallToken) {
    LOG.debug("PostCallWithException for bean {}, method {}", cm.getId(), 
m.getName(), ex);
    if (preCallToken != null) {
    Coordination coordination = (Coordination)preCallToken;
    coordination.fail(ex);
    coordination.end();
    }
}
{code}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)