Equinox Aspects not functioning as documented [message #662805] |
Fri, 01 April 2011 03:13 |
Robert Brown III Messages: 36 Registered: July 2009 |
Member |
|
|
I have created an aspect within one bundle whose pointcut keys off a method call by an interface in another bundle.
I have done all that is described in the documentation in order to properly set up the aspect, but apparently the aspect isn't being engaged. In fact, in the code I am getting a warning saying that the advice "has not been applied".
My aspect is:
public aspect ServiceGate
{
pointcut serviceCatch(Map<String,String> theMap) :
cflowbelow(execution(void BundleActivator.start(BundleContext))) &&
execution(ServiceResult IAresService.performService(Map<String,String>)) &&
args(theMap);
ServiceResult around(Map<String,String> theMap) : serviceCatch(theMap)
{
System.out.println("A Service was called!");
return(proceed(theMap));
}
}
The manifest for the aspect bundle is below:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Security Bridge
Bundle-SymbolicName: mil.af.ares.aspect.security
Bundle-Version: 1.0.0
Bundle-Activator: mil.af.ares.aspect.security.SecurityActivator
Bundle-Vendor: Self
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: mil.af.ares.service.intfc,
org.osgi.framework;version="1.3.0"
Bundle-ActivationPolicy: lazy
Require-Bundle: org.aspectj.runtime;bundle-version="1.6.11";visibility:=reexport
Export-Package: mil.af.ares.aspect.bridge
Eclipse-SupplementBundle: mil.af.ares.service.intfc
and my aop.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<aspectj>
<aspects>
<aspect name="mil.af.ares.aspect.bridge.ServiceGate" />
</aspects>
</aspectj>
This setup follows the documentation for using Equinox Aspects exactly, but for some reason the aspect is not working.
Am I missing something in the setup? I have the weaver working and the hook is properly set up (and the debugger shows the hook code working properly!). I have set up everything else according to the documentation, or at least I am sure that I did. So am I missing something,or have I found a bug in Equinox Aspects. Does it work at all?
If I have found a bug, where do I go to report it? Who do I talk to about problems with this project???
Someone please advise.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03607 seconds