Hi, you've reached the website of Mark Menard, Freemason, developer, businessman, photographer, motorcyclist and all around nice guy.
The main joy in my life is Sylva, my loving partner and friend. (You will see plenty of pictures of her. Also check out our site.) My professonal career is running a consulting firm concentrating on business automation and custom software. I enjoy software development, motorcycles, photography, dancing, freemasonry and travel.
Here you will find galleries of my latest photos, thoughts on software development, freemasonry, the occassional politics, and other things. Enjoy your time here.
Mark
An ongoing photographic study of Freemasonry.
To contact Mark send an email to mark@mjm.net. You will receive an auto response from my mail server to verify you're not a spammer.
© Mark Menard 2002-2007
Workaround the AOP and Groovy classloader
Dear Mark
I have same similar problem like you in my current company project. I have tried a workaround method which "SEEM" to work in my case. But I am not sure that it works in other case. I have created 2 application xml files in my application. The first application xml file contains all the beans and Groovy script definition. The second application xml file contains only the pointcut definition like:
In my java program, I need to create 2 ApplicationContext like:
ApplicationContext context1 = new ClassPathXmlApplicationContext( new String[] {"applicaionContext1.xml"}); ApplicationContext context2 = new ClassPathXmlApplicationContext( new String[] {"applicaionContext2.xml"}, context1);It seems that if I pass the context1 to create context2, the AspectJ classloader and GroovyClassloader are not sibiling any more and AspectJ classloader can see the Groovy Class implementation interface. I have already posted my workaround to the spring forum. But I am not sure that my workaround will have any problem in other cases. If you find any problems with my workaround, please let me know so that I can avoid the problem in my project. My email is ctam@xeniumhk.com Thanks a lot for your help.
Thanks
chris tam
xenium