Vita Rara: A Life Uncommon

Re: The same issue with Spring Reloading Script Proxy

As you can see I punted when it came to having Spring instantiate my action instances. Having to define an interface for each one that the proxy would implement was just too much busy work for no gain. I wanted to write less code not more.

The fact that Spring wraps everything manufactured bean in a proxy hurts. I wish there was a way to instruct Spring that I just want it to instantiate the bean, and just the bean, fill in the dependencies and hand it back to me. I haven't found that this functionality exists in the framework.

I've wondered if Guice might be able to do this, but haven't really dug into it too far.

Now as to the actual process of the proxy, it is my experience that even if the method exists on the class written in Groovy, if it is not exposed on an interface that the class implements the Proxy will not have the method. So, if you are using some simple properties to track form inputs you have to express all of those methods setThis(), getThat(), on an interface someplace. *bleck*

All of these issues is what drove me to make the Groovy loader that instantiates the Groovy actions and then hands the instance to Spring for wiring. The drawback is that I've lost control of the wiring, but I've saved a lot of boilerplate unnecessary coding.

Mark

PS: Who are you?

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options