Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6870213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:39:21+00:00 2026-05-27T03:39:21+00:00

I have an existing project built on spring. I would like to catch calls

  • 0

I have an existing project built on spring.

I would like to catch calls to HibernateTemplate.save() so I define a pointcut on exec(save()), and log the time in an around advice.

I could define the aspects using spring AOP, but I can see the spring AOP only works if the object in the pointcut is a bean, but in my case, the HibernateTemplate could be created in a new() directly in existing client code.

so I have to use aspectj compiler, through maven plugin. I wonder if there are any potential conflicts for mixing spring AOP and aspectj ? —- previous developers of this project may have already used Spring AOP somewhere

Thanks
Yang

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:39:22+00:00Added an answer on May 27, 2026 at 3:39 am

    I normaly use AspectJ instead of Spring-Proxy-AOP for all my Spring Apps. To do this, you need to set some spring configruation, mostly set something like mode="AspectJ". Once I forgot this for some of that configurations, that mean the application used AspectJ for some Aspects and Spring-Proxy-AOP for the others, and yes the application worked correct (except the cases where I really needed AspectJ instead of pring-Proxy-AOP).

    So from my point of view: If you have enough test cases, then give them a try.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing C++ project on a linux environment, and would like to
In my company, we have a project built upon this pattern. I would like
I have an existing project that builds fine using my IDE. I'd like to
I have an existing WCF RIA project built on the Release Candidate; I'm now
I have imported an existing project built using Maven into my Eclipse workspace. Should
I have an existing project written in Ruby on Rails. It is sort of
I have an existing project that consumes web services. One was added as a
I have an existing project repo which I use for project A, and has
I have a simple task. I have an existing project with a web service
I'm a C#, ASP.NET newbie. Let's say I have an existing C# project (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.