Announcement Announcement Module
Collapse
No announcement yet.
Will this work? EJB and AOP...Happy end?! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    I would like to advice a method of SLSB
    Why do you need the SLSB. Why not bypass it altogether.

    Comment


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

      Comment


      • #4
        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.

        Comment


        • #5
          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!

          Comment


          • #6
            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.

            Comment

            Working...
            X