JBoss Community

Interceptor not Working in JBoss 6.0.0

created by chris.schauer in JBoss AOP - View the full discussion

Hi,

 

i am trying to get an application deployed to jboss 6.0.0. I dont know whats wrong.

JBoss start without problems.

 

If the Interceptor will called, i'll get the attached exceptions.

 

My jboss-aop.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<aop xmlns="urn:jboss:aop-beans:1.0">

   <interceptor name="etmInterceptor" class="com.path.myproject.web.common.PerformanceMeasureInterceptorWeb" scope="PER_VM"/>>

   <bind pointcut="execution(* de.company.myproject.MYPROJServletWrapper->*(..))">
       <interceptor-ref name="etmInterceptor" />
   </bind>

</aop>

 

I configured the jboss.aop.path para in run.bat

 

My Interceptor:

 

 

public class PerformanceMeasureInterceptorWeb implements Interceptor {
 
      /** Properties. */
    private static Logger log = Log.create();
 
    @Override
    public Object invoke(Invocation invocation) throws Throwable {
        Object ret = null;
 
        if (invocation instanceof MethodInvocation) {
        
           ...
 
            try {
              log.info("INTERCEPTOR invoke >>>" +pointName);
               ret  = method.invokeNext();
              } finally {
                  
                  log.info("INTERCEPTOR end <<<" +pointName);
              }
 
        }
 
          ...    }
 
    @Override
    public String getName() {
        return this.getClass().getSimpleName();
    }
}

 

I use Maven for compile and Build the Application an package it to an EAR-File.

My jbossaop-plugin is configured like:

 

 

        <plugin>
            <groupId>org.jboss.maven.plugins</groupId>
            <artifactId>maven-jbossaop-plugin</artifactId>
            <version>2.1.3.GA</version>
            <executions>
                <execution>
                    <id>compile-aop</id>
                    <phase>compile</phase>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                    <configuration>
                        <includeProjectDependency>true</includeProjectDependency>
                        <aoppaths>
                            <aoppath>src/main/resources/jboss-aop.xml</aoppath>
                        </aoppaths>
                    </configuration>
                </execution>
            </executions>
        </plugin>

 

The very first test was succesfully. But after changing the Interceptor or refactoring i always get the attached Exceptions.

I really dont know i all things considered

 

Great thx for helping

Chris

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community