First of all I need to say that I'm not so experienced in Google App Engine.
I know that it is possible that we deploy RESTful Web-services (JERSEY) on GAE
And also I know that RESTLET has a version specifically for GAE.
I want to take advice from those who have worked with both approaches that which one is better.
For example is configuring the GAE application for JERSEY too difficult or struggling??? Or for example has using RESTLET any disadvantages? Or is it too thick (RESTLET)?
Thanks
I started one year ago to develop an app with Jersey and Google App Engine. Great experience from my side, but I have never worked with Restlet ..
I try here to summarize the main difficulties I found in GAE integration:
web.xml fragment:
<servlet>
<servlet-name>jersey</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>***package-with-your-classes***;org.codehaus.jackson.jaxrs</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Configurator:
@Provider
public class JAXBContextResolver implements ContextResolver<JAXBContext> {
private AnnoxAnnotationReader annotationReader;
private JAXBContext context;
private Class<?>[] classTypes = new Class[] { .. all your classes .. };
public JAXBContextResolver() {
annotationReader = new AnnoxAnnotationReader();
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(JAXBRIContext.ANNOTATION_READER, annotationReader);
try {
this.context = JAXBContext.newInstance(classTypes, properties);
} catch (JAXBException e) {
..
}
public JAXBContext getContext(Class<?> objectType) {
return context;
}
.. as you can see I use Annox to avoid annotations inside my model classes!
Hope it helps! Michele Orsi