org.eaglei.model.gwt.server
Class TestModelServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.eaglei.model.gwt.server.ModelServlet
                      extended by org.eaglei.model.gwt.server.TestModelServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ModelService

public class TestModelServlet
extends ModelServlet

Subclass of ModelServlet suitable for use in a junit GWTTestCase. In a GWTTestCase execution, the GWTShellServlet is not loading a web.xml file and invoking specified listener classes. Since the spring ContextLoaderListener is not being invoked, WebApplicationContext is not automatically being created and initialized with an application.xml configuration file. In this class, the servlet init() method has been overriden to explictly construct an ApplicationContext with the configuration files needed for this GWT RPC servlet. If the underlying servlet is changed to construct its own ApplicationContext instead of getting it using WebApplicationContextUtils, then this class may no longer be necessary.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eaglei.model.gwt.server.ModelServlet
logger
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
TestModelServlet()
           
 
Method Summary
 void init()
           
 
Methods inherited from class org.eaglei.model.gwt.server.ModelServlet
getClass, getClassDefinitions, getEquivalentClasses, getInstitutions, getLabels, getNonResourceBaseClasses, getProperties, getSubClasses, getSuperClasses, getTopLevelClasses, getVersion
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestModelServlet

public TestModelServlet()
Method Detail

init

public void init()
Overrides:
init in class ModelServlet


Copyright © 2009-2010 Eagle-I. All Rights Reserved.