Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP + AspectJ
RAP + AspectJ [message #1132480] Fri, 11 October 2013 07:15 Go to next message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 32
Registered: September 2012
Member
Hi,

I am trying to start using aspects in my RAP application.

Launching from eclipse works properly: aspects are working. To enable them I have added aspectj plugins in launch conf (aspectj.runtime, aspectj.weaver and equinox.weaving.aspectj (auto start)) and additional VM argument (-Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook).

Command "ss" in OSGI console of my RAP application shows me that required bundles are started and my aspects are works:
1       RESOLVED    org.eclipse.equinox.weaving.hook_1.0.200.I20120427-0800
                    Master=0
56      ACTIVE      org.aspectj.runtime_1.7.0.20120703164200
93      ACTIVE      org.eclipse.equinox.weaving.aspectj_1.0.100.I20120427-0800

// rap plug-ins
58	ACTIVE      org.eclipse.rap.ui_2.0.0.20121230-1109
59	ACTIVE      org.eclipse.rap.rwt_2.0.0.20130205-1612

//demo 
36      ACTIVE      org.eclipse.rap.demo.controls_2.0.0.qualifier

Now I am trying do the same in my war product:
I have added this plug-ins in my *.warproduct file and have exported it. In the generated product I modified configuration/config.ini file refers on this doc as follows:

#Product Runtime Configuration File
osgi.framework.extensions=org.eclipse.equinox.weaving.hook
aj.weaving.verbose=true
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true
osgi.bundles.defaultStartLevel=4
osgi.bundles=.... some plugins ....
  org.eclipse.equinox.weaving.aspectj@0:start,\
  org.aspectj.runtime@start,\
  org.eclipse.equinox.weaving.hook,\
// demo & rap plugins
  org.eclipse.rap.demo.controls@start,\
  org.eclipse.rap.jface@start,\
  org.eclipse.rap.jface.databinding@start,\
  org.eclipse.rap.rwt@start,\
  org.eclipse.rap.rwt.osgi@start,\
  org.eclipse.rap.ui@start,\
  org.eclipse.rap.ui.forms@start,\
  org.eclipse.rap.ui.workbench@start


After deploying into tomcat command "ss" has next output:
124     RESOLVED    org.eclipse.equinox.weaving.hook_1.0.200.I20120427-0800
                    Master=0
65      ACTIVE      org.aspectj.runtime_1.7.0.20120703164200

// rap & demo plug-ins
482     ACTIVE      org.eclipse.rap.demo.controls_2.0.0.201310111355
112     ACTIVE      org.eclipse.rap.jface_2.0.0.20130107-0921
                    Fragments=483
113     ACTIVE      org.eclipse.rap.jface.databinding_2.0.0.20121031-1050
114     ACTIVE      org.eclipse.rap.rwt_2.0.0.20130205-1612
                    Fragments=484
115     ACTIVE      org.eclipse.rap.rwt.osgi_2.0.0.20130110-2216
116     ACTIVE      org.eclipse.rap.ui_2.0.0.20121230-1109
117     ACTIVE      org.eclipse.rap.ui.forms_2.0.0.20130111-1314
118     ACTIVE      org.eclipse.rap.ui.workbench_2.0.0.20130107-1035


But where is no org.eclipse.equinox.weaving.aspectj plug-in! I missed something or why aspects are not started in my RAP application?

Thanks,
Igor
Re: RAP + AspectJ [message #1137043 is a reply to message #1132480] Mon, 14 October 2013 08:21 Go to previous message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 32
Registered: September 2012
Member
To fix issue, just specify start level in config.ini file
  org.eclipse.equinox.weaving.aspectj@1\:start,\
Previous Topic:ExternalBrowser.open(browserWindowId, url, SWT.NONE);
Next Topic:Get styles from current theme CSS
Goto Forum:
  


Current Time: Tue Nov 25 00:52:36 GMT 2014

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

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