I've messed with no server mode and serialization files a bit but unfortunately my situation is somewhat simpler so I don't think what I've done is directly applicable. I'm using GWT 2.0 so some of this may does not apply if you are using earlier versions.
I have an simpler situation than you do because I build the server application after the GWT code is compiled so I have access to the RPC files and they get placed in the war, or at least into the app server class path at that time. Thinking about it though I may have a solution. The SerializationPolicy is returned from the doGetSerializationPolicy method in RemoteServiceServlet. The default implementation of this uses getResourceAsStream to read the file from the web server classpath. To handle running GWT test cases with no server (and also to provide additional logging for doUnexpectedFailure) I use a subclass of RemoteServiceServlet instead of using RemoteServiceServlet directly. In this subclass I check for a system property that indicates whether or not I'm running a test case, this is set by the scripts that execute the test cases. If it is set then instead of the default behavior I open a URL connection to read the serialization data from the server running the test case instead of trying to find it in the classpath of the server running the servlet. I think a similar approach could be used in your situation. It doesn't matter where the data is, provided the doGetSerializationPolicy method can find it. Perhaps you could override that method and load the data from a well known location in the filesystem if the files are not in the app server classpath? It may require copying the files around but at least wouldn't need an app server restart. A fancier alternative would be to have a simple server that provided access to the serialization files via http so that the doGetSerializationPolicy method could use a URL connection to read the data. Anyway, those are my thoughts at the moment. Perhaps they will spur others to suggest better alternatives. On Feb 24, 3:07 am, Ed <post2edb...@hotmail.com> wrote: > I gave the above remote context some more thoughts, and it's not an > option: > > - I run in the following environments: dev, test, acceptance, > production and build. > The dev and build environments are the ones that give me problems as I > run GWTTestCase's in these mode's with a proxy servlet to forward the > call to the running tomcat instance (-noserver mode) (server is > started/stopped through the maven cargo plugin). > The gwt tests run in gwt modules that aren't reachable through HTTP, > so the above Remote context isn't an option. > > Sometimes my tests fail during dev or our nightly build because the > polixy file is outdated and need to be replaced... This isn't a > desired situation: the build being dependent on policy file not being > up2date :( > > I hope to get some more details through the forum to implement my own > SerializationPolicy. I think that is still my best workable option. > At this moment, these policy files cost me a too much time, and I > tried several options now through the years.. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors