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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:30:14+00:00 2026-06-05T07:30:14+00:00

I have a problem which is hard to explain so lets get started: Context:

  • 0

I have a problem which is hard to explain so lets get started:

Context: I have a application running on a tomcat server Lets call it “admin”. The admin have an import/export function. Our own application is an extension to that and we need to gather some information when the “admin apps” use the import/export function.

Problem: The third party jar that contain the class ImportController is located there: ~/someFolder/admin/WEB-INF/lib/admin.jar. The goal is to gather the Old project ID and the new Project ID so that our extension can link our class to the right project. Since i know the method signature i though i could use AOP to do so.

Idea: The idea i came with is to put something like idHiJacker.jar that would contain a single pointcut and advice into the ~/someFolder/admin/WEB-INF/lib/ and enable load-time weaving. That advice would simply put the information into an xml file so our extension would be able to read it when we want to put the link back after a project import.

Also i must say I’m a pure newbie with AOP and web stuff. But i do not wish to import a monster for just doing this small operation with AOP. At the moment im reading on aspectJ and AspectWerkz

Question:

  • 1) Am I in the right direction? Do you see anything that would make this idea not work at all?
  • 2) If this is possible what would be the good practice to do it in a very clean manner?
  • 3) Should i do it with AspectJ? AspectWerkz? Or Something else?
  • 4) Am i doing this for nothing? Is there an easier way to do that operation?

Edit: Also if you have good tutorial to link with answer, it would be awesome

Thanks for your time and answer

  • 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-06-05T07:30:15+00:00Added an answer on June 5, 2026 at 7:30 am

    Question:

    1) Am I in the right direction? Do you see anything that would make this idea not work at all?
    

    I can’t see any reason why this will not work. Aspect Oriented Programming and cross-cutting concerns apart, the notion of advice is to execute some before or after some other pointcut and often to influence the behavior of that advised function. You are doing exactly that here.

    2) If this is possible what would be the good practice to do it in a very clean manner?
    

    There is some inherent chaos with aspects/advices — since the control flow is hijacked more then a simple sequential reading of code is needed to understand whats going on.

    3) Should i do it with AspectJ? AspectWerkz? Or Something else?
    

    I have never used AspectWerkz but I have very good experience with AspectJ; especially in terms of the support here on stackoverflow and perhaps even more on its mailing list.

    4) Am i doing this for nothing? Is there an easier way to do that operation?
    

    Unless you can change the code of import controller or change the clients to make extra calls to do the linking thing this interception based approach seems best IMHO.

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

Sidebar

Related Questions

This is a problem which is hard to explain in words, though I have
I have a problem which requires a reversable 1:1 mapping of keys to values.
I have a problem which I cant seem to find answer to through searches
I have a problem which I don't know how to fix. It has to
I have a problem which i can't seem to find the solution to. I
I'm developing an Eclipse plug-in and I have a problem which is reproduced here:
I have a strange problem which I can't fix: A field: private boolean[][][] gaps;
I have a code problem which stems from the fact that I am using
I have an apparently easy problem which is: <div class=container> <div class=a></div> <div class=b></div>
i have a small problem here which i cannot fix,This post goes through but

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.