Announcement Announcement Module
Collapse
No announcement yet.
Is this a good candidate for around advise. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is this a good candidate for around advise.

    Hello Friends,

    I am new to AOP, I am using Spring 2, I have read only about tracing and logging of AOP. In one of my JSF application, I have the following requirement,

    In the application (which is used by a publication house), each manuscript
    will have concerned person(s) with an assigned from date and to date, this persons are responsible for the processing of manuscript at various stages.

    Concerned Person Id From To Manuscript ID
    1 11.01.2008 15.01.2008 1
    2 16.01.2008 20.01.2008 1
    3 21.01.2008 25.01.2008 1

    The stages include, generating provisional approval letter, forwarding manuscript for internal evaluation, then for external evaluation etc etc.
    So while capturing each stage, the application need check that a concerned
    person exists for the specified date for the specified manuscript.

    Can I use an around advise here? So that if there is no concerned person assigned for the specified date for the specified manuscript I can generate an
    exception and need not proceed to capture the entry.

    Any suggestions?

    Thank you.

    Sudheer

  • #2
    before advice would be better since you are throwing an exception before the call occurs, and not doing anything after it. The general rule of thumb is to use the simplest advice that satisfies the requirement.

    Comment

    Working...
    X