Announcement Announcement Module
No announcement yet.
After advice design question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • After advice design question


    we have multiple clients (struts, soap, etc) that access a services tier whereby transaction demaraction is control via an around advice. We also have another cross cutting conern that I can encapsulate in an after advice. However, unlike the transaction advice these clients may need to do other processing specific to that particular client type, ie a struts action would need to do a forward, etc.

    So, my question is how can these different clients be informed that they need to do extra 'client-specific' logic based on the after advice. I dont want to throw an exception, so my only other idea at this point is to set something, ie a flag, in a threadlocal that the client could then check? If I cant do this, then the logic in the after advice would need to be duplicated across the struts actions and soap handlers.

    thanks in advance.

  • #2
    I would suggest using a thread local, as you mention.


    • #3

      I think that you should learn some ideas with JavaServerFaces. These days I began to learn it. May be the term "UI component" fitted to you.