soontobeared
soontobeared

Reputation: 451

Hibernate with Tomcat vs Hibernate with JBoss

I am a newbie trying to figure out the pros and cons of using Hibernate with Tomcat and with JBoss.

I am developing a web application with Flex at the front-end, BlazeDS as the messaging service and Java at the back-end. We have decided on using Hibernate as the persistence mechanism but would like to know the trade-offs of using it with Tomcat and JBoss.

Thanks.

Upvotes: 5

Views: 5709

Answers (4)

David Tinker
David Tinker

Reputation: 9644

Use JPA with Hibernate as your JPA implementation on Tomcat. This is simpler and simpler is usually better. You can easily "upgrade" to the more complete stack offered by JBoss should you need to as it uses Tomcat as its servlet container.

Upvotes: 0

skaffman
skaffman

Reputation: 403581

Tomcat is JBoss's servlet engine, so you'll be using Tomcat regardless.

I would go for JBoss in your case. It already come with Hibernate, saving you the need to bundle Hibernate in your application. JBoss comes pre-configured with multiple different profiles, so you can pick the profile that does what you need without having much in the way of baggage (i.e. you can safely ignore all the heavy JavaEE stuff). Equally, if your application need to start using more JavaEE stuff (e.g. web services, EJB3), you can easily bring those JBoss services in.

Incidentally, you might want to look at GraniteDS as an alternative to BlazeDS, it seems to be a better piece of software.

Upvotes: 5

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181450

It shouldn't make a difference. You could use Hibernate with both.

Having said that, I would recommend using it with JBoss, since it comes installed OOB and you won't need to configure your application server specially to use Hibernate.

Also, consider using JPA (EJB3). If you use JBoss, you will use Hibernate under the hood and you'll benefit from using a more general Java EE standard.

Upvotes: 0

duffymo
duffymo

Reputation: 308998

I believe JBOSS EJB3 is using Hibernate as its JPA implementation. Hibernate is also embedded into Seam. And JBOSS uses Tomcat as its servlet/JSP engine, so your comparison isn't "either/or".

If done properly, your choice of Flex should not know or care about how you persist things. That should be hidden from the client by the messaging interface.

Upvotes: 1

Related Questions