Why use RESThub

508 views
Skip to first unread message

Igor Rosenberg

unread,
Nov 5, 2010, 6:59:10 AM11/5/10
to resth...@googlegroups.com

Hi,

 

I’ve just started developing a REST service. I decided to go the jersey+tomcat+maven way. Then I stumbled upon RESThub. Is there information somewhere on the difference between the available REST-enabling platforms? Some comparison table between jersey, RESTeasy, RESThub & others?

 

Regards

 

Igor

 
------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive
this e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin
group liability cannot be triggered for the message content. Although
the sender endeavours to maintain a computer virus-free network,
the sender does not warrant that this transmission is virus-free and
will not be liable for any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion confidencial
destinada solamente a la(s) persona(s) mencionadas anteriormente
pueden estar protegidos por secreto profesional.
Si usted recibe este correo electronico por error, gracias por informar
inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos Origin
no se hace responsable por su contenido. Su contenido no constituye ningun
compromiso para el grupo Atos Origin, salvo ratificacion escrita por ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus.
------------------------------------------------------------------

Bouiaw

unread,
Nov 5, 2010, 10:01:37 AM11/5/10
to resthub-dev
Hi,

In fact we are not at the same level. RESThub is an integration
framework that give you what we consider as the best stack (Hibernate
3.5 used as JPA 2 provider, Spring 3 used with JEE6 annotations,
Jersey used as JAX-RS implementation) in order to allow you to develop
efficiently you app.

We have tried various JAX-RS implementations, especially CXF and
Jersey. And Jersey is really the perfect match for what we need. I
know that RESTeasy provide nice advanced features too, but since we
are fine with Jersey on a lot of project, we plan to keep it. When we
started, CXF did not implement JAX-RS 1.1, but I has changed since CXF
2.3 implement it.

One blocking point with CXF was that you had to configure your
webservices in a central configuration file, which is not the RESThub
way of doing that.

For your need, you could use RESThub to see how Jersey work in a full
stack example. If you have Maven and java6 installed, just type the
followjng command to create a sample project :
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0:generate -
DarchetypeRepository=http://resthub.org/nexus/content/repositories/
snapshots -DarchetypeGroupId=org.resthub -DarchetypeArtifactId=resthub-
simple-webapp-archetype -DarchetypeVersion=1.0-SNAPSHOT

After that, just launch "mvn jetty:run" to have a Jersey instance
running.

You will find more information on the RESThub presentation :
http://www.slideshare.net/sdeleuze/resthub-framework-presentation

On Nov 5, 11:59 am, "Igor Rosenberg" <igor.rosenb...@atosresearch.eu>
wrote:

Igor Rosenberg

unread,
Nov 26, 2010, 6:13:48 AM11/26/10
to resth...@googlegroups.com

Hello

 

Using the example found for resthub, I try to run:

                mvn tomcat:run

               

Compilation works fine, but when tomcat is started:

 

GRAVE: Exception starting filter JpaFilter

java.lang.ClassCastException: org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter cannot be cast to javax.servlet.Filter

        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)

 

Is that a common error?

 

Thanks for any hints.

Igor

Bouiaw

unread,
Nov 26, 2010, 6:30:15 AM11/26/10
to resthub-dev
What version of Tomcat is runned with mvn tomcat:run ? Tomcat 6 ?
Could you also check that it works with jetty:run instead ?

On Nov 26, 12:13 pm, "Igor Rosenberg" <igor.rosenb...@atosresearch.eu>
wrote:

Igor Rosenberg

unread,
Nov 26, 2010, 9:17:39 AM11/26/10
to resth...@googlegroups.com
Hi,

Works flawlessly with 'mvn jetty:run'. I don't think Tomcat is the one I've installed myself - I didn't change the pom.xml, I don't think maven could infer I had a local tomcat (which is not running). I think it's instead the one maven downloads (Apache Tomcat/6.0.29), as it states:
Searching repository for plugin with prefix: 'tomcat'.

The trace has more info:

[INFO] [tomcat:run {execution: default-cli}]
[INFO] Running war on http://localhost:8080/RESTapp
[INFO] Using existing Tomcat server configuration at D:\resthub\RESTapp\target\tomcat
26-nov-2010 15:10:43 org.apache.catalina.startup.Embedded start
INFO: Starting tomcat server
26-nov-2010 15:10:44 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29

Thanks for helping
Igor

Bouiaw

unread,
Nov 26, 2010, 9:31:47 AM11/26/10
to resthub-dev
On our side we usually run RESThub applications in jetty:run while
developping, and on Tomcat on production, and we have no issues.
Perhaps you could deploy your war in a vanilla Tomcat to check the
result. I would suspect an issue in Tomcat Maven integration, which is
far away from jetty one.

On Nov 26, 3:17 pm, "Igor Rosenberg" <igor.rosenb...@atosresearch.eu>
wrote:
> Hi,
>
> Works flawlessly with 'mvn jetty:run'. I don't think Tomcat is the one I've installed myself - I didn't change the pom.xml, I don't think maven could infer I had a local tomcat (which is not running). I think it's instead the one maven downloads (Apache Tomcat/6.0.29), as it states:
>         Searching repository for plugin with prefix: 'tomcat'.
>
> The trace has more info:
>
>         [INFO] [tomcat:run {execution: default-cli}]
>         [INFO] Running war onhttp://localhost:8080/RESTapp
Reply all
Reply to author
Forward
0 new messages