Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Weaving bundles using equinox aspects and AJDT(Weaving bundles using equinox aspects and AJDT)
Weaving bundles using equinox aspects and AJDT [message #705100] Fri, 29 July 2011 12:28
Bala  is currently offline Bala Friend
Messages: 1
Registered: July 2011
Junior Member
I have created a sample bundle [samplebundle] and an aspect bundle [OAuthUtilAspect]. I followed the steps specified in eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-start.php

and it worked fine.

[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
[samplebundle] info AspectJ Weaver Version 1.6.12.M1 built on Monday Jun 13, 2011 at 20:16:13 GMT
[samplebundle] info register aspect com.hp.sbs.aspect.OAuthUtilAspect
[org.eclipse.equinox.weaving.aspectj] info weaving bundle 'samplebundle'
[samplebundle] weaveinfo Join point 'method-call(void samplebundle.TestSample.printOP(java.lang.String))' in Type 'samplebundle.Activator' (Activator.java:15) advised by around advice from 'com.hp.sbs.aspect.OAuthUtilAspect' (OAuthUtilAspect.aj:19)
[samplebundle] weaveinfo Join point 'method-call(void samplebundle.TestSample.printOPAgain())' in Type 'samplebundle.Activator' (Activator.java:16) advised by around advice from 'com.hp.sbs.aspect.OAuthUtilAspect' (OAuthUtilAspect.aj:24)
[samplebundle] weaveinfo Join point 'method-call(void samplebundle.TestSample.printOPAgain())' in Type 'samplebundle.TestSample' (TestSample.java:6) advised by around advice from 'com.hp.sbs.aspect.OAuthUtilAspect' (OAuthUtilAspect.aj:24)
[samplebundle] weaveinfo Join point 'method-execution(void samplebundle.TestSample.printOPAgain())' in Type 'samplebundle.TestSample' (TestSample.java:11) advised by before advice from 'com.hp.sbs.aspect.OAuthUtilAspect' (OAuthUtilAspect.aj:28)
Hello World!!
in aspect from Activator
@ joinpointcall(void samplebundle.TestSample.printOP(String))
around the printOPAgain



I need to start the bundles from a Java class. So I have mentioned the bundles as part of config.ini [as below] and start using the EclipseStarter.

osgi.bundles=reference\:file\:C\:/trialWksp/SBSPlatform/coreplugins/org.aspectj.runtime_1.6.12.20110613132200.jar@start,reference\:file\:C\:/trialWksp/SBSPlatform/coreplugins/org.aspectj.weaver_1.6.12.20110613132200.jar@start,reference\:file\:C\:/trialWksp/SBSPlatform/coreplugins/oauthasp.jar@3\:start,reference\:file\:C\:/trialWksp/org.eclipse.equinox.weaving.hook_1.0.0.v20100503.jar,reference\:file\:C\:/trialWksp/SBSplatform/equinox/plugins/org.eclipse.equinox.weaving.aspectj_1.0.0.v20100503@2\:start,reference\:file\:C\:/trialWksp/SBSPlatform/containerplugins/samplebundle-1.0.0.jar

osgi.bundles.defaultStartLevel=4
osgi.framework=file\:C\:/trialWksp/org.eclipse.osgi_3.6.1.R36x_v20100806.jar
osgi.framework.extensions=org.eclipse.equinox.weaving.hook
aj.weaving.verbose=true
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true
osgi.configuration.cascaded=false


In this scenario the weaving does not happen. The following is the log.

[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ...
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
Hello World!!
in TestSample -- printing output again--
in TestSample -- printing output -- from Activator
in TestSample -- printing output again--
Number of bundles --- 7
org.eclipse.osgi --- 32
org.eclipse.equinox.weaving.hook --- 4
org.aspectj.runtime --- 32
org.aspectj.weaver --- 32
com.hp.sbs.aspect --- 32
org.eclipse.equinox.weaving.aspectj --- 32
samplebundle --- 32


What could be the issue? Please help.
Previous Topic:JavaBeans ...howto?
Next Topic:abstract syntax tree: How to parse annotations?
Goto Forum:
  


Current Time: Fri Mar 29 04:42:30 GMT 2024

Powered by FUDForum. Page generated in 0.02453 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top