Results 1 to 10 of 15

Thread: AOP with spring dm server

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    232

    Default AOP with spring dm server

    Is it not possible to have my Aspect defined in standalone bundle that is to say seperate from the bundle implementing the service being adviced

  2. #2
    Join Date
    Oct 2008
    Posts
    493

    Default

    Are you using AspectJ with load-time weaving or compile-time weaving?

    This is definitely possible when compile-time weaving is used: dm Server itself uses a number of aspects that are held in bundles that are separate to those that have been advised.

    If you're using load-time weaving then things become significantly more complex. My advice in this case would be to consider using compile-time weaving if possible.
    Andy Wilkinson
    SpringSource

  3. #3
    Join Date
    Nov 2008
    Posts
    232

    Default

    i am using runtime weaving support provided by spring AOP

    Basically i have a Bundle(say BundleA) with service interface ,BundleB implementing the interface

    Now i don't want each implementer to have a Aspect defined in there application context ,instead i would prefer to define Aspect in the interface bundle so that all the Bundles which provide implementation are adviced

  4. #4
    Join Date
    Oct 2008
    Posts
    493

    Default

    Ah, ok, you're using Spring AOP: that makes things easier.

    When you configure a LoadTimeWeaver bean in your application context, dm Server automatically replaces it with an OSGi-aware load-time weaver implementation: KernelLoadTimeWeaver.

    You'll have to make sure that your bundle manifest imports the package(s) that contain your aspect(s).

    I would recommend giving this a go and letting us know if you encounter any problems and we'll do what we can to help.
    Andy Wilkinson
    SpringSource

  5. #5
    Join Date
    Nov 2008
    Posts
    232

    Default

    Hi Andy ,

    This did not work either .

    Regards

    vishal

  6. #6
    Join Date
    Oct 2008
    Posts
    493

    Default

    Ok. What was the failure that you encountered? It's going to be very hard to diagnose the problem without more details on what you were trying to do, and what went wrong. We'll need stack traces, log output, etc.
    Andy Wilkinson
    SpringSource

Posting Permissions

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