Spring/Hibernate vs. J2EE container and EJB

Discussions

EJB design: Spring/Hibernate vs. J2EE container and EJB

  1. Spring/Hibernate vs. J2EE container and EJB (5 messages)

    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.

    Threaded Messages (5)

  2. Good book...[ Go to top ]

    Better, Faster, Lighter Java
    By Bruce A. Tate, Justin Gehtland
  3. 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.
  4. 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.

    regards,
    Tworas
  5. 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? ;)
  6. You can use terracota[ Go to top ]

    Terracota can help very easily without any change in code to achieve high availability

    http://www.terracotta.org.

    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.

    Kureem Rossaye

    Project manager/ Business decision