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 929293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:08:50+00:00 2026-05-15T20:08:50+00:00

I have an application using AspectJ with load time weaving to advise various methods.

  • 0

I have an application using AspectJ with load time weaving to advise various methods. I would like to put a switch in my program to disable the aspect without having to make any source code changes or having to restart the program. It needs to incur as little overhead as possible while turned off. Thanks!

  • 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-15T20:08:51+00:00Added an answer on May 15, 2026 at 8:08 pm

    To my knowledge, there is no way to unweave some advice from bytecode. If you’re working with an existing piece of augmented bytecode, I don’t believe there’s any way to remove it other than restarting the application without the weaving*.

    If you’re talking about setting things up so they can be removed – it may be true that the weaving can’t be removed, but you could certainly add a global if (useWeavedCode) check around all of it, and of course add that variable as well as methods to modify it in an appropriate way (expose via JMX, new console command, new admin JSP page, etc.). Then if you want to prevent this new behaviour, you can disable it with this new option.

    Note of course that this doesn’t actually remove the code, and incurs the cost of a boolean
    parameter lookup while it’s disabled, but I don’t think it’s possible to do better than that.

    *Strictly you need to get the class loaded again, so you don’t need to restart the app, but in practice this is likely the most straightforward option available to you unless you’ve previously put hooks into the classloaders.

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

Sidebar

Related Questions

I have been developing an iphone application using a domain model, and have put
I have an application using QtWebKit. It loads URLs and exports some stats on
I have an application using FeedbackPanel to show the user the results of posting
We have an application using the IBM Informix driver. Whenever we try to open
I have an application using the Google Maps javscript API and the Infobox plug-in
I have an application using LINQ-to-SQL with SQL Server CE 4. I know that
I have an application written using C++ Builder 5 that uses the TDocument class.
I have a C# application using WPF consisting of a single Window holding four
I have developed an application using postgresql and it works well. Now I need
I have a wpf application using Caliburn.Micro. I need to bind a ListBox to

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.