subclassing Spring's controllers

Discussion in 'Java' started by s o, Aug 12, 2006.

  1. s o

    s o Guest

    Hi all,

    we're starting a new project using Spring with a Oracle db. We have
    some housekeeping/infrastructure task that needs to be procssed for
    almost every web request (e.g. auditing the request.) what would be a
    good approach to this? Does Spring's different controllers already
    offer a hook for this? I was thinking putting a layer betwn my
    controllers and spring's controllers. For example: MySimpleFormBase
    extends SimpleFormController, MyMultiActionBase extends
    MultiActionController. This should work but not very elegant. Can
    anyone shed some lights on this? thanks.

    s o
    s o, Aug 12, 2006
    #1
    1. Advertising

  2. s o

    goobledigook Guest

    Have you thought about using AOP for this type of stuff? Spring
    (especiall v.2 coming up soon) offers great facilities for wrapping any
    business object with aspects which you should use for
    logging/auditing/...

    s o wrote:
    > Hi all,
    >
    > we're starting a new project using Spring with a Oracle db. We have
    > some housekeeping/infrastructure task that needs to be procssed for
    > almost every web request (e.g. auditing the request.) what would be a
    > good approach to this? Does Spring's different controllers already
    > offer a hook for this? I was thinking putting a layer betwn my
    > controllers and spring's controllers. For example: MySimpleFormBase
    > extends SimpleFormController, MyMultiActionBase extends
    > MultiActionController. This should work but not very elegant. Can
    > anyone shed some lights on this? thanks.
    >
    > s o
    goobledigook, Aug 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    349
  2. Desperate
    Replies:
    0
    Views:
    806
    Desperate
    Aug 31, 2006
  3. Rob
    Replies:
    0
    Views:
    736
  4. rmn190
    Replies:
    2
    Views:
    2,338
    Arne Vajhøj
    Jan 10, 2008
  5. Goldfish
    Replies:
    1
    Views:
    657
    Goldfish
    Nov 6, 2008
Loading...

Share This Page