I made a mistake when i said that JBoss Kernel was an Osgi Kernel, it is
a custom micro-kernel that seems to Osgi but it is not Osgi like
Glassfish, JOnAS, Eclipse, Weblogic ...
The classloader mecanism of Jboss modules is explained here
<http://www.javacodegeeks.com/2012/09/jboss-as-7-classloading-explained.html>
When an application is deployed on the deployementd directoty, there is
an implicit jboss module created. The classes of this implicit modules
can be woven with byteman with the parameter that delegates to the
system classloader
JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,jlp,com.ibm" that acts like
|org.osgi.framework.bootdelegation |of OSGI Bundles. The JBoss parameter
runs correctly with Byteman but not correctly with aspectj ( a bcel
issue with AspectJ).
For JBoss declared modules, it seems that the problem is not resolved
also with Byteman as related in this post of the Byteman developper (
Andrew yes another Andrew :-) DINN) =>
https://developer.jboss.org/thread/248812
so i think that the problem is the same with declared JBOSS module.
Andrew DINN has some ideas with Byteman, do you ( Andy CLEMENT) have the
same with JBoss, Jigsaw ( JDK 9) , Osgi against AspectJ ?
In a couple of monthes, i will be free to study this case ( Byteman and
AspectJ) . I have no tested AspectJ at CTW with JBoss. I will do it also.
For information :
AspectJ vs Byteman
Roughly :
Common : Both can act at LoadTImeWeaving ( Byteman only as LTW)
AspectJ <=> Byteman
Pointcut <=> Rule
Advice <=> Helper
there are also a lot of differences ( no wild character with Byteman ...)
Le 10/11/2014 18:27, Andy Clement a écrit :
Hi,
AspectJ deliberately doesn’t try to do anything funky with class
loaders as that is always painful. But if the environment it is
running on is being too clever it can trip us up. To access the class
file data we are making a call:
InputStream is =
loaderRef.getClassLoader().getResourceAsStream(classFile + ".class");
But in that environment it is not giving us an answer. Possibly
getResource is being handled differently to loadClass? Can we find out
more about the delegation strategy it is using for loading things? Any
further JBoss config options we can tweak?
I’m happy to work with someone on resolving this but I really don’t
know a lot about JBoss.
cheers,
Andy
On Nov 10, 2014, at 12:38 AM, jean-louis.pasturel
<jean-louis.pastu...@orange.fr
<mailto:jean-louis.pastu...@orange.fr>> wrote:
A long time ago, i have this problem and i raised the bug below. It
is still open. The cause is the gestion of classloader with jboss
modules.
I test at every version of aspectj, but the bug is still here. I
have no tested with aspectj 1.8.x. The workaround does not run also.
For injecting code on jboss serverr, i swtiched to byteman
http://byteman.jboss.org/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=406817
Envoyé depuis mon appareil mobile Samsung
-------- Message d'origine --------
De : 刘洋 <oux...@163.com <mailto:oux...@163.com>>
Date : 10/11/2014 9:03 (GMT+01:00)
A : aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
Objet : [aspectj-users] LTWJboss7 error
Does anyone know whether AspectJ with LTW works for JBoss 7? I tried
following these instructions but got errors below
12:30:37,746 ERROR [stderr] [ModuleClassLoader@3243b595] info AspectJ
Weaver Version 1.6.12 built on Tuesday Oct 18, 2011 at 17:52:06 GMT
12:30:37,762 ERROR [stderr] [ModuleClassLoader@3243b595] info
register classloader org.jboss.modules.ModuleClassLoader@3243b595
13:57:01,634 ERROR [stderr] [JasperLoader@64f221c7] info register
classloader org.apache.jasper.servlet.JasperLoader@64f221c7
INSTRUCTIONS : http://wiki.eclipse.org/LTWJboss7
Thanks,
ouxijv
2014-11-10
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org <mailto:aspectj-users@eclipse.org>
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users