Hi Cristiano

I have implemented once a small application using Spring AOP running on Karaf 2.3.x. I used the dynamic imports for the bundle using Spring AOP and after starting the bundle checked with imports command which packages were really imported. Next I have disabled dynamic imports and used the packages from the imports commands. My configuration for the bundle imports looks like this

            <!-- necessary for @Transactional -->
            org.aopalliance.aop,
            org.springframework.transaction,
            org.springframework.aop,
            org.springframework.aop.framework,


            <!-- necessary for Spring AOP -->
            org.springframework.core,
            org.springframework.aop.config,
            org.springframework.aop.aspectj,
            org.springframework.aop.aspectj.annotation,
            org.springframework.context.config,
            org.springframework.transaction.interceptor,
            org.springframework.beans.factory,
            org.springframework.beans.factory.xml,
            org.springframework.osgi.context,
            org.springframework.osgi.service.exporter.support,
            org.springframework.osgi.service.importer,

<!-- import all packages from aspectjweaver instead of using Require-Bundle -->
             aj.org.objectweb.asm,
             aj.org.objectweb.asm.signature,
             org.aspectj.apache.bcel,
             org.aspectj.apache.bcel.classfile,
             org.aspectj.apache.bcel.classfile.annotation,
             org.aspectj.apache.bcel.generic,
             org.aspectj.apache.bcel.util,
             org.aspectj.asm,
             org.aspectj.asm.internal,
             org.aspectj.bridge,
             org.aspectj.bridge.context,
             org.aspectj.internal.lang.annotation,
             org.aspectj.internal.lang.reflect,
             org.aspectj.lang,
             org.aspectj.lang.annotation,
             org.aspectj.lang.internal.lang,
             org.aspectj.lang.reflect,
             org.aspectj.runtime,
             org.aspectj.runtime.internal,
             org.aspectj.runtime.internal.cflowstack,
             org.aspectj.runtime.reflect,
             org.aspectj.util,
             org.aspectj.weaver,
             org.aspectj.weaver.ast,
             org.aspectj.weaver.bcel,
             org.aspectj.weaver.bcel.asm,
             org.aspectj.weaver.internal.tools,
             org.aspectj.weaver.loadtime,
             org.aspectj.weaver.loadtime.definition,
             org.aspectj.weaver.ltw,
             org.aspectj.weaver.model,
             org.aspectj.weaver.patterns,
             org.aspectj.weaver.reflect,
             org.aspectj.weaver.tools,


            <!-- necessary when using proxy-target-class="true" -->
            <!-- net.sf.cglib.proxy,
            net.sf.cglib.core,
            net.sf.cglib.reflect, -->

            <!-- Necessary for schema based AOP -->
            org.springframework.aop.aspectj.autoproxy,

I think, you don't need the imports for aspectj, because you will use only Spring AOP (but I am not quite sure). My demo uses also the compile time weaving with AspectJ. For this purpose I had to include the AspectJ packages.

I can't publish the whole code because this is my company code. I'll try to prepare a simple sample in the near future.
I hope it helps you.

Best regards
Krzysztof





On 07.01.2014 11:46, Cristiano Costantini wrote:
Thank you very much Filippo!
it is an interesting use case and I will check it out,

however I search for experience of using it with Felix and using in Spring
XML bean definition files, if someone else has more direct suggestions for
my use case I would be glad to know how you did used it.

Cristiano





Reply via email to