Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home »  » AJDT » @AfterReturing not reached
@AfterReturing not reached [message #1760363] Wed, 26 April 2017 11:42
None None is currently offline None NoneFriend
Messages: 1
Registered: April 2017
Junior Member
I've created this aspect:

    @Pointcut("execution(* com.living.commty.boot.resources.*.* (..))")
	public void resourcesCut() {}


I'm trying to get execution after they has been returned:

    @AfterReturning(pointcut="resourcesCut()", returning="result")
	public void afterReturning(JoinPoint joinPoint, Object result)
	{
		this.logAfterReturningTrace(joinPoint, result);
	}


My class is:

    package com.living.commty.boot.resources;
    public class EmailResources {
    	
    	@Inject private ConfigurationResources configurationResources;
    	@Inject protected TokenResources cipheringResources;
    	
    	public String buildURI(String id, byte[] token) throws URISyntaxException
    	{	    
    	    return "";
    	}
    	
    	public byte[] decodeParameter(String value)
    	{
    		return "";
    	}
    	
    	public void sendActivationMail(User user) throws MailGenerationException
    	{
    
    	}
    }


However, they are never reached.

Nevertheless, if I add an `@Before`:

    @Before("resourcesCut()")
	public void beforeCreate(JoinPoint joinPoint) {
		this.logBeforeTrace(joinPoint);
	}


it's reached!

I've also added an @AfterThrowing advice and it's able to wrap up to 39 points. However, my @AfterReturning only 6! I've attached images.

index.php/fa/29139/0/

index.php/fa/29140/0/

Any ideas?
Previous Topic:Aspect not getting detected by Apache Tomcat 8.5.x
Next Topic:AspectJ Logger under existing project.
Goto Forum:
  


Current Time: Sun Dec 17 00:46:00 GMT 2017

Powered by FUDForum. Page generated in 0.02343 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software