10 Replies Latest reply: Jul 11, 2009 6:07 PM by Oren Livne RSS

    Spring AOP & Fuse 4.0.0.3

    Tomasz Kaczanowski Newbie

      Hello all,

       

      I use Fuse ESB 4.0.0.3 and Spring Dynamic Modules to register the services in OSGi registry - and it works fine.

       

      But I have a problem when trying to run simple Spring AOP example on Fuse ESB 4.0.0.3. If in my spring-config file I try to put any aspect declaration (using <aop:aspectj-autoproxy> or <aop:config>) I get java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint or java.lang.ClassNotFoundException: org.aspectj.lang.reflect.AjTypeSystem respectively.

       

      The thing is, that both these classes from org.aspectj.lang.* are included in the bundle, and are exported - so I'd expect that they will be available at runtime. I think I have tried out all the (im)possible variants of Export/Import-Package (and also Embed-Dependency) configurations of this bundle - but nothing works for me.

       

      The whole exception looks like:

      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL ; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:166)

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:132)

              at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)

              at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:423)

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:211)

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:221)

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:172)

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:136)

              at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:746)

              at java.lang.Thread.run(Thread.java:619)

      Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

              at java.lang.Class.forName0(Native Method)

              at java.lang.Class.forName(Class.java:169)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(ConfigBeanDefinitionParser.java:208)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.getAdviceClass(ConfigBeanDefinitionParser.java:442)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.createAdviceDefinition(ConfigBeanDefinitionParser.java:396)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAdvice(ConfigBeanDefinitionParser.java:363)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAspect(ConfigBeanDefinitionParser.java:258)

              at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:148)

              at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1255)

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1245)

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)

              ... 15 more

      Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint

              at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:198)

              at org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4SearchPolicy.java:45)

              at org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClass(ContentClassLoader.java:109)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

              ... 30 more

      Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint

              at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassOrResource(R4SearchPolicyCore.java:486)

              at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(R4SearchPolicyCore.java:185)

              ... 34 more

       

      Could anyone give me some hints on how to use Spring AOP on Fuse ESB ?

       

      best regards

      Tomasz Kaczanowski

        • 1. Re: Spring AOP & Fuse 4.0.0.3
          Gert Vanthienen Novice

          Tomasz,

           

          If you import the package on your own bundle, it should be available once a matching export has been found. 

           

          If I hazard a guess here, I'd say the problem is the order in which the bundles are being started.  The org.aspectj class imports are marked as optional on the Spring bundles.  All the Spring bundles are started very early on, so adding the AspectJ bundle afterwards wouldn't make it available to the Spring bundles.  Could you try adding the AspectJ bundle to the system folder and to etc/startup.properties list, to make sure it gets started early on?

           

          Regards,

           

          Gert

          • 2. Re: Spring AOP & Fuse 4.0.0.3
            Tomasz Kaczanowski Newbie

            Hello Gert,

             

            thx for this idea, but I'd like to ask some more questions. I've added both aspectj jars to system folder:

             

            system/org/aspectj

            |-- aspectjrt

            |   `-- 1.6.2

            |       `-- aspectjrt-1.6.2.jar

            `-- aspectjweaver

                `-- 1.6.2

                    `-- aspectjweaver-1.6.2.jar

             

            and I've added this lines to etc/startup.properties:

            org/aspectj/aspectjrt/1.6.2/aspectjrt-1.6.2.jar=25

            org/aspectj/aspectjweaver/1.6.2/aspectjweaver-1.6.2.jar=25

             

            but it still doesn't work.

             

            When I execute "osgi list" using console, these two libraries are listed like this:

            mvn:org.aspectj/aspectjweaver/1.6.2

            mvn:org.aspectj/aspectjrt/1.6.2

             

            I've also compared these jars with other in "system"folder, and noticed that, their MANIFEST.MF file is not "OSGi-fied". Can it be the case of problems ? Should I try to add the required information to MANIFEST.MF of aspectj jars ?

             

            best regards

            Tomasz Kaczanowski

            • 3. Re: Spring AOP & Fuse 4.0.0.3
              Gert Vanthienen Novice

              Tomasz,

               

              Yeah, you're right, the jars should contain the necessary OSGi metadata to be deployed as bundles.  Sorry about not checking that before making the suggestion.

               

              BTW, you can also get the Maven bundle plugin to generate the necessary metadata for you by wrapping the original bundles.  Have a look at https://svn.eu.apache.org/repos/asf/servicemix/smx4/bundles/trunk/commons-csv-1.0/pom.xml and its parent pom https://svn.eu.apache.org/repos/asf/servicemix/smx4/bundles/trunk/bundles-pom/pom.xml for more information.

               

              Regards,

               

              Gert

              • 4. Re: Spring AOP & Fuse 4.0.0.3
                Oren Livne Novice

                I am encountering the same problem in FUSE 4.1.0.0. Has someone solved this problem yet?

                • 5. Re: Spring AOP & Fuse 4.0.0.3
                  Oren Livne Novice

                  I created a bundle that embeds aspectjrt and aspectjweaver and added it to startup.properties:

                   

                  org/apache/servicemix/bundles/org.apache.servicemix.bundles.asm/2.2.3_1/org.apache.servicemix.bundles.asm-2.2.3_1.jar=24

                  org/aspectj/fuse-aspectj/1.6.4/fuse-aspectj-1.6.4.jar=25

                   

                  (Turns out it requires asm, so I had to add the asm line)

                   

                  Then I created a bundle that has one POJO service and one aspect that is activated using <aop:config>. Still, same problem:

                   

                  09:19:40,687 | ERROR | xtenderThread-73 | WaiterApplicationContextExecutor | WaiterApplicationContextExecutor  398 | Unable to create application context for , unsatisfied dependencies: none

                  org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL ; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

                       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)

                       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)

                       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

                       at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)

                       at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)

                       at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)

                       at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)

                       at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)

                       at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)

                       at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)

                       at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:68)

                       at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:259)

                       at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

                       at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:237)

                       at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:215)

                       at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:168)

                       at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:179)

                       at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:759)

                       at java.lang.Thread.run(Thread.java:619)

                  Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint

                       at java.lang.Class.forName0(Native Method)

                       at java.lang.Class.forName(Class.java:169)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.class$(ConfigBeanDefinitionParser.java:208)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.getAdviceClass(ConfigBeanDefinitionParser.java:445)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.createAdviceDefinition(ConfigBeanDefinitionParser.java:399)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAdvice(ConfigBeanDefinitionParser.java:366)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.parseAspect(ConfigBeanDefinitionParser.java:261)

                       at org.springframework.aop.config.ConfigBeanDefinitionParser.parse(ConfigBeanDefinitionParser.java:148)

                       at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)

                       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)

                       at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)

                       at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)

                       at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)

                       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)

                       at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)

                       ... 18 more

                  Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.JoinPoint

                       at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:558)

                       at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)

                       at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1427)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

                       ... 33 more

                  09:24:16,875 | INFO  | localShell       | CommandLineExecutorImpl          | om.shell.CommandLineExecutorImpl   64 | Executing (String): headers 156

                  09:24:16,875 | INFO  | localShell       | CommandLineExecutorImpl          | om.shell.CommandLineExecutorImpl  104 | Executing (headers):

                   

                  It seems like the FUSE spring bundle that loads the application context does not have access to aspectj. the Spring Context (2.5.6) does not have any org.aspectj.*in its headers, not even as optional. Spring AOP (2.5.6) does, but I am not sure if it is used in creating the app context for my bundle.

                  • 6. Re: Spring AOP & Fuse 4.0.0.3
                    Artur Socha Newbie

                    I used to have the same problem. I solved it (don't know if the word 'solve' is appropriate here) by adding -javaagent:/path/to/weaver.jar  java_opts in bin/servicemix.bat.

                    I also did the same steps you described (added weaver.jar to system and loaded it at startup)

                     

                    Let me know if this helped with your problem.

                     

                    greetz,

                    Artur

                    • 7. Re: Spring AOP & Fuse 4.0.0.3
                      Oren Livne Novice

                      Thank you so much for your reply. However, I tried to add "-javaagent:/path/to/spring-agent.jar" and that didn't help. Still getting

                       

                       

                      smx@root:/> Exception in thread "SpringOsgiExtenderThread-70" org.springframewor

                      k.beans.factory.BeanCreationException: Error creating bean with name 'fqeSimpleS

                      ervice': BeanPostProcessor before instantiation of bean failed; nested exception

                      is java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem

                              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

                      Factory$1.run(AbstractAutowireCapableBeanFactory.java:405)

                              at java.security.AccessController.doPrivileged(Native Method)

                              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

                      Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                              at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb

                      ject(AbstractBeanFactory.java:264)

                              at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr

                      y.getSingleton(DefaultSingletonBeanRegistry.java:222)

                              at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe

                      an(AbstractBeanFactory.java:261)

                              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

                      (AbstractBeanFactory.java:185)

                              at org.springframework.beans.factory.support.AbstractBeanFactory.getBean

                      (AbstractBeanFactory.java:164)

                              at org.springframework.beans.factory.support.DefaultListableBeanFactory.

                      preInstantiateSingletons(DefaultListableBeanFactory.java:423)

                              at org.springframework.context.support.AbstractApplicationContext.finish

                      BeanFactoryInitialization(AbstractApplicationContext.java:728)

                              at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

                      plicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:6

                      8)

                              at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

                      plicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:343)

                              at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCus

                      tomTCCL(PrivilegedUtils.java:85)

                              at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp

                      plicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.ja

                      va:308)

                              at org.springframework.osgi.extender.internal.dependencies.startup.Depen

                      dencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterAp

                      plicationContextExecutor.java:138)

                              at java.lang.Thread.run(Thread.java:619)

                      Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/reflect/AjTypeSystem

                       

                              at org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFact

                      ory.isAspect(AbstractAspectJAdvisorFactory.java:120)

                              at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAuto

                      ProxyCreator.isInfrastructureClass(AnnotationAwareAspectJAutoProxyCreator.java:9

                      8)

                              at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.

                      isInfrastructureClass(AbstractAutoProxyCreator.java:381)

                              at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.

                      postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:281)

                              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

                      Factory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFa

                      ctory.java:791)

                              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

                      Factory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:762)

                              at org.springframework.beans.factory.support.AbstractAutowireCapableBean

                      Factory$1.run(AbstractAutowireCapableBeanFactory.java:399)

                              ... 15 more

                      Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.reflect.AjTypeSyst

                      em

                              at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourc

                      eByDelegation(ModuleImpl.java:558)

                              at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleI

                      mpl.java:59)

                              at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.

                      loadClass(ModuleImpl.java:1427)

                              at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

                              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

                              ... 22 more

                       

                      Are you talking about adding /path/to/aspectjweaver.jar? That doesn't seem right. Thanks again.

                      • 8. Re: Spring AOP & Fuse 4.0.0.3
                        Artur Socha Newbie

                        In my case I used aspectjweaver not springagent.

                         

                        Artur

                        • 9. Re: Spring AOP & Fuse 4.0.0.3
                          Oren Livne Novice

                          Hi Arthur,

                          I tried aspectjweaver.jar but that didn't work either. I will try to simply create my own application context within the OSGi jar, say in an OSGi bundle listener, and try to load the aspectj classes therein. This is undesired and unclean coding, but I see no other way.

                           

                          Can someone please point me to a code example that employs Spring AOP and @AspectJ annotations within an OSGi bundle deployed ro FUSE? I can't find any example in the FUSE source code that uses even  tags in the spring context files, let alone annotations. I can live without LTW but not without AOP.

                           

                          Thank you.

                          • 10. Re: Spring AOP & Fuse 4.0.0.3
                            Oren Livne Novice

                            The weirdest thing is that I don't think I am using AspectJ anywhere. I don't want to use it but to rely on Spring AOP. Why does the bundle complain about not finding AspectJ if all I'm doing is using &lt;aop&gt; tags? Here's my spring context:

                             

                            &lt;?xml version="1.0" encoding="UTF-8"?&gt;

                            &lt;beans xmlns="http://www.springframework.org/schema/beans"

                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"

                            xmlns:aop="http://www.springframework.org/schema/aop"

                            xsi:schemaLocation="

                            http://www.springframework.org/schema/beans

                            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

                            http://www.springframework.org/schema/context

                            http://www.springframework.org/schema/context/spring-context-2.5.xsd

                            http://www.springframework.org/schema/aop

                            http://www.springframework.org/schema/aop/spring-aop-2.5.xsd

                            "&gt;

                             

                            &lt;!--

                            regular spring configuration file defining the beans for this bundle.

                            The configuration of OSGi definitions is kept in a separate

                            configuration file so that this file can easily be used for

                            integration testing outside of an OSGi environment

                            --&gt;

                             

                            &lt;!--

                            Executes simple "hello, world"-type methods.

                            --&gt;

                            &lt;bean id="simpleService" class="edu.utah.further.examples.fuse_aop.SimpleServiceImpl" /&gt;

                             

                            &lt;!-- =========================================== --&gt;

                            &lt;!-- Aspect & proxies                            --&gt;

                            &lt;!-- =========================================== --&gt;

                             

                            &lt;bean id="myAspect" class="edu.utah.further.examples.fuse_aop.MyAspect" /&gt;

                             

                            &lt;aop:config&gt;

                            &lt;aop:aspect id="simpleServiceAspect" ref="myAspect"&gt;

                            &lt;aop:pointcut id="businessService"

                            expression="execution(* edu.utah.further.examples.fuse_aop.SimpleService.*(..))" /&gt;

                            &lt;aop:before pointcut-ref="businessService" method="beforeAdvice" /&gt;

                            &lt;/aop:aspect&gt;

                            &lt;/aop:config&gt;

                            &lt;/beans&gt;