|Spring contexts and aspectj weaver [message #933934]
||Fri, 05 October 2012 13:27
| Charlie Mordant
Registered: July 2010
I think I pointed out a bug on an eclipse bundle or any other osgi-weaving feature.
As said in another post, I integrated Aspectj weaving with Virgo this way:
* Putting equinox weaving hook in the lib folder
* Adding osgi.framework.extensions=org.eclipse.equinox.weaving.hook in the config.ini
* Adding file:lib/org.eclipse.equinox.weaving.hook_1.0.200.I20120427-0800.jar in the base bundles of the userregion
* com.springsource.org.aspectj.weaver;bundle-version="0" in the bundle-import section
* org.eclipse.equinox.service.weaving;version="0",\ in the package import section
* repository:bundle/org.eclipse.equinox.weaving.aspectj, repository:bundle/org.eclipse.equinox.weaving.caching.j9 in the initial-artifacts section
Weaving works fine (I can use @Configurable), here's my aop.xml:
<!DOCTYPE aspectj PUBLIC
<weaver options="-verbose -debug">
<!-- only weave classes in our application-specific packages -->
<include within="net.osgiliath.view.main..*" />
And my META-INF/spring/context.xml:
<context:load-time-weaver aspectj-weaving="autodetect" />
<context:component-scan base-package="net.osgiliath.view" />
It works fine in a simple bundle.
The problem is when this bundle reference an other spring-dm/configurable powered bundle: all the beans defined in the second bundle (and scanned) are not resolved, giving me a nosuchbeandefinitionexception and resolves the beans of the first bundle (for example, it tries to wire the spring integration channels defined in the first bundle!)!
The log shows that it only scannned the first bundle META-INF/spring directory...
I'm I wrong on something, or is this a bug?
If it is, where do I create a ticket ?
[Updated on: Fri, 05 October 2012 13:31]
Report message to a moderator
|Re: Spring contexts and aspectj weaver [message #940361 is a reply to message #933934]
||Thu, 11 October 2012 15:07
| Glyn Normington
Registered: July 2009
If I've understood correctly, you're saying that you have two bundles, let's call them A and B, and they both start fine, but when you add a reference (import-package? import-bundle? require-bundle? fragment-host? or what?) from A to B, then B stops working. If so, that feels like a bug, except perhaps if you used fragment-host as then the two bundles could interfere with each other.|
You case raise bugs on bugzilla.
Powered by FUDForum
. Page generated in 0.02366 seconds