Forum Home » Fuse Distributions » Fuse ESB

Thread: Spring AOP & Fuse 4.0.0.3

 
This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 10 - Last Post: Jul 11, 2009 10:07 PM Last Post By: oren
tokc

Posts: 14
Registered: 07/31/08
Spring AOP & Fuse 4.0.0.3
Posted: Feb 4, 2009 1:39 PM
 
  Click to reply to this thread Reply
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 bundle://143.0:0/META-INF/spring/file-proc-applicationContext.xml; 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
gertv

Posts: 167
Registered: 06/18/08
Re: Spring AOP & Fuse 4.0.0.3
Posted: Feb 6, 2009 9:08 AM   in response to: tokc in response to: tokc
Helpful
  Click to reply to this thread Reply
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
tokc

Posts: 14
Registered: 07/31/08
Re: Spring AOP & Fuse 4.0.0.3
Posted: Feb 9, 2009 1:10 PM   in response to: gertv in response to: gertv
 
  Click to reply to this thread Reply
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:
7 Active 25 mvn:org.aspectj/aspectjweaver/1.6.2
8 Active 25 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
gertv

Posts: 167
Registered: 06/18/08
Re: Spring AOP & Fuse 4.0.0.3
Posted: Feb 10, 2009 8:46 AM   in response to: tokc in response to: tokc
 
  Click to reply to this thread Reply
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
oren

Posts: 71
Registered: 05/28/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 10, 2009 1:49 AM   in response to: gertv in response to: gertv
 
  Click to reply to this thread Reply
I am encountering the same problem in FUSE 4.1.0.0. Has someone solved this problem yet?
oren

Posts: 71
Registered: 05/28/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 10, 2009 3:32 PM   in response to: oren in response to: oren
 
  Click to reply to this thread Reply
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 http://edu.utah.further.examples.fuse-aop, unsatisfied dependencies: none
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL bundle://156.0:0/META-INF/spring/bundle-context.xml; 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): 156

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.
arturs

Posts: 8
Registered: 06/16/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 11, 2009 5:01 PM   in response to: oren in response to: oren
 
  Click to reply to this thread Reply
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
oren

Posts: 71
Registered: 05/28/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 11, 2009 5:48 PM   in response to: arturs in response to: arturs
 
  Click to reply to this thread Reply
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.

arturs

Posts: 8
Registered: 06/16/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 11, 2009 5:52 PM   in response to: oren in response to: oren
 
  Click to reply to this thread Reply
In my case I used aspectjweaver not springagent.

Artur
oren

Posts: 71
Registered: 05/28/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 11, 2009 9:51 PM   in response to: arturs in response to: arturs
 
  Click to reply to this thread Reply
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 <aop> tags in the spring context files, let alone annotations. I can live without LTW but not without AOP. :-)

Thank you.
oren

Posts: 71
Registered: 05/28/09
Re: Spring AOP & Fuse 4.0.0.3
Posted: Jul 11, 2009 10:07 PM   in response to: oren in response to: oren
 
  Click to reply to this thread Reply
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;