cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajagopal Chowdary Yendluri <>
Subject CXF With Spring AOP is not working.
Date Wed, 13 Mar 2013 15:50:50 GMT

Here is the scenario i am trying.

1. when an exception thrown from a web service i want to invoke an aspect
which is sending a mail to a mailing list.

Here is the steps which i tried.

1. Added AspectJ support in applicaiton context by adding the following


2.  Written a new Aspect as following:

public class ExceptionMailer{

@AfterThrowing(pointcut="execution(* com.mycompany.*..impl.*.*(..))",
throwing ="ex")
public void sendExceptionMail(JoinPoint joinPoint) {
System.out.println(" Sending Email .....................again ");

3. Here is my WebService class.

@WebService(endpointInterface =
public class UserServiceImpl implements UserService {

public List<User> getUserDetails(String userId) throwsException {

try {
                        throw new Exception("Msg Exception ....");
 } catch (Exception e) {
throw new Exception("xcepiton");
public void init() {

When i create a seperate project  with the same pointcout and with the same
package structure it is working good, but not with CXF.

Is there any way / we need to tell CXF, that i am using AspectJ AOP.
It is not throwing any exception, it is silently ignoring the Aspect.

Rajagopal Yendluri(Raj)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message