Results 1 to 2 of 2

Thread: Is this a good candidate for around advise.

  1. #1
    Join Date
    Mar 2008
    Posts
    2

    Default 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. #2
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    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.
    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •