问题描述:

I'm trying to see if I can get GWT to work with Ehcache for a powerful client-side caching solution.

But Ehcache requires that a file called ehcache.xml be on the runtime classpath. At runtime, when a cache manager/factory attempts to create a cache (in the Java code), it looks to the classpath for this XML descriptor and builds a cache with the specifications it contains.

But how would this work for GWT? Come runtime, the Java code has already been translated to JavaScript! How would the JS code know to look for ehcache.xml? And not just for Ehcache, but for any 3rd party JAR that requires some kind of runtime configuration (XML, PROPERTIES, or otherwise) file to work?

网友答案:

You might try using REST and EhCache Server:

http://sujitpal.blogspot.com/2010_03_01_archive.html

相关阅读:
Top