In order to serialize groovy classes across a cluster I think they will need to be wrapped in a dynamic proxy. This proxy holds the actual groovy class instance plus details of the groovy file that was used to generate the instance. We then have to have special readObject and writeObject implementations on this proxy. Writing the object writes details of the Groovy file used to make the class and then serializes the class instance. The object read first reads the Groovy file used to make the class and attempts to do a groovy compile if the class cannot be found. Once this is done then the actual class can be deserialized.
This leads to two interesting points:
1) We would probablly need some flag to indicate that the application is clustered or not (as well as adding <distributable/> to the web.xml file). We don't want to go to all the hastle of generating dynamic proxies when 99% or groovy wicket apps will probably be non-clustered ones.
2) Clustering groovy in this way actually eliminates the main advantage of using Groovy. In a cluster it is no longer possible to change the groovy files while the application is running because you have no way of keeping the groovy files on each machine in sync with each other. The only way to do it would be to keep the groovy files in a database or cluster-wide cache!
regards, Chris
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
