Results 1 to 6 of 6

Thread: Will this work? EJB and AOP...Happy end?!

Hybrid View

  1. #1
    Join Date
    Apr 2005
    Posts
    7

    Default Will this work? EJB and AOP...Happy end?!

    Hi!

    I am really interested how the post with topic "Will this work? EJB and AOP" ends?
    I am trying to combine EJB with AOP at the very moment. I would like to advice a method of SLSB but cannot find enough information. Could you help me? The "Will this work? EJB and AOP" is really helpful discussion but is not finished.

    Wiating for your favourable help

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    I would like to advice a method of SLSB
    Why do you need the SLSB. Why not bypass it altogether.

  3. #3
    Join Date
    Apr 2005
    Posts
    7

    Default

    Do you mean to advice a helper class used by SLSB to implement the real business logic??

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    Do you mean to advice a helper class used by SLSB to implement the real business logic??
    Actually I meant many of the things you do with SLSBs you can do in Spring (e.g. declarative transaction management, instance pooling, etc...) - so you could remove it, depending on it's purpose.

  5. #5
    Join Date
    Apr 2005
    Posts
    7

    Default

    I know that very well but I should use SLSE (do not ask me why =) ) and I am using Spring in its AOP part.
    Anyway if you know a good source of information about advising SLSB you can share it.

    Thank you!

  6. #6
    Join Date
    Feb 2005
    Location
    Boston, MA
    Posts
    1,142

    Default

    I don't believe you can advise an EJB directly because you do not control its lifecycle. The EJB container does.

    Spring AOP requires that objects are retrieved from a Spring context.

    What I would advise (no pun intended) is to create a business object, and in ejbCreate of the SLSB retrieve the business object using Spring. You can then specify whatever advise you want to add to the business object using standard Spring techniques.

    This technique is preferred because if you choose to divorce your business object and call it locally or with another remoting method you can.

Posting Permissions

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