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
Spring issue solved
I modified a bit your Groovy Works class, and now Groovy defined beans are exposed as expected by Struts. It's pretty simple actually, all you have to do is to add this method:
public Object buildBean(String beanName, Map extraContext)
throws Exception
{
Object o = super.buildBean(beanName, extraContext);
if (o != null) {
String name = o.getClass().getName();
if (name.startsWith("$Proxy")) {
Method m = o.getClass().getMethod("getTargetSource", null);
o = m.invoke(o, null);
m = o.getClass().getMethod("getTarget", null);
o = m.invoke(o, null);
}
}
return o;
}
My name is Martin Mavrov, and I came to your page while evaluating different web frameworks that have expressive power at least matching JSF's. At the same time I want to be able to do most things without restarting the J2EE server, so the framework should support Groovy. This is how your solution got in my field of view. But I still wanted to have everything nicely embedded in Spring, so I tried to find a way to have reloading scripted Spring beans as actions in Struts 2. Now hopefully I have settled for Struts 2 + Spring + Groovy + JPA for future projects.
BTW, if you are satisfied with the solution, you are free to put it in GroovyWorks.