There is a lot of talk right now about using solutions like Spring/Hibernate rather than deploying on a J2EE server and using Session/Entity beans. While I understand the arguments against EJB (especially) and _for_ Spring/Hibernate, I'm wondering what the general critiques of Hibernate and (moreso) Spring are? Not so much from the perspective of defending EJB or anything, but are there areas in enterprise development where 'lightweight' frameworks fall short. For instance, how do they handle distributed data caches that must remain synchronized between app servers.
- Posted by: Donald Kittle
- Posted on: July 29 2004 13:28 EDT
- Good book... by Matthew Wilson on July 29 2004 15:05 EDT
- Spring/Hibernate vs. J2EE container and EJB by Jeff Genender on July 31 2004 11:17 EDT
Better, Faster, Lighter Java
By Bruce A. Tate, Justin Gehtland
Before accepting the rhetoric on Spring/Hibernate vs. EJB, I would attempt too look at what you are trying to do. If you are going to build a site that will require 24x7 uptime, take a very high hit load and transaction rate, I would take a second look at EJB for scalability purposes. When you start talking about "distributed data caches that must remain synchronized between app servers", clustering seems to be in your cards. Therefore, you are not going to get the performance nor manageability outside of what EJB offers...let the EJB haters whine...but that is a fact, not an opinion.
If you are writing something smaller in size, then there are some advantages to going down the Spring/Hibernate route.
The right choice is going to depend on the scalability and uptime requirements of your system.
Before accepting the rhetoric on Spring/Hibernate vs. EJB, I would attempt too look at what you are trying to do. If you are going to build a site that will require 24x7 uptime, take a very high hit load and transaction rate, I would take a second look at EJB for scalability purposes.AFAIK the answer is not that obvious. You may cluster Tomcat (version 5
offers session replication). You may also cluster DBbs using open source
drivers (HA-JDBC, C-JDBC). It is quite easy to create a system without any
single-node-of-failure without EJB.
Ok Adam but doing this with tomcat is not a standard and you stay
dependent of that application server. With EJBs you can do that
in a vendor-independence way, right? ;)
Terracota can help very easily without any change in code to achieve high availability
I have only tried it to test if it works. Its easy to install, and it works.
But I have not yet tried it on real projects. But it is worth taking a look.
Project manager/ Business decision