Slashdot Mirror


Building a Stable and Clustered J2EE Environment?

royles asks: "I am working with several J2EE Application Servers and all seems fine until I start to scale and cluster. The goal is to ensure a web and EJB session is maintained across a pool of Application Servers. The level of complexity to achieve this straightforward requirement is proving too much. It quickly becomes evident that vendors claims of 'robust and scalable' go straight out the window in favour of extortionate support and consultant costs when the installation becomes large. Anybody else experienced this type of problem? What are other peoples experienceâ(TM)s in this area? Any recommendations on Application servers that âdo what they say on the tinâ(TM)? Any good online resources for achieving a highly scaled and robust solution?"

3 of 43 comments (clear)

  1. Weblogic does this for us by crstophr · · Score: 3, Interesting

    We are implementing a 3 tier high availability cluster using weblogic as the application layer. We have them clustered though a weblogic provided apache module on our load balanced web layer. It also survives the failover of the database layer as well. These things do still need consideration in the code you write (mainly the part about reconnecting after a database failover). Weblogic seems to handle the redundancy and load balancing fine if you let it maintain it's persistance by storing it's que and object data in the database layer. --Chris

  2. Are EJB's really worth it? by Anonymous Coward · · Score: 3, Interesting

    Excuse my ignorance, I'm just beginning to learn EJB. But as I learn more about them, I can't help thinking: "what's the deal?".

    I mean, what's wrong with having your MVC webapp being based on JSP/Servlets, plus plain-old Java objects for the business-logic (accessing the DB via JDBC). Tomcat itself has support for load-balancing among several Tomcat servers; and as for the business-logic objects, these would be acting like client apps in a traditional C/S fashion, so they can be distributed without problems (and the transactional stuff should be taken care of by the DB, that's what RDBMS are for, no?)

    So again, what's the big deal with EJB? Training wheels for programmers who don't grok databases and transactions; who think tha JDBC is too complicated??? Seriously, I'd like to be enlightened on this.

    1. Re:Are EJB's really worth it? by elemur · · Score: 4, Interesting

      EJBs are going to be in a guarenteed transactional state throughout the cluster, which simplifies all of your access. The containers should be caching some types of beans as well (CMP), so that you end up with a very fast transactionally complete solution across the environment. You can use JDO or other data solutions, add your own cache, manage it across the cluster.. and that may work well for you. Other beans are useful, such as the Message Driven Beans, for building a J2EE standard event driven component. Straight data mapping solutions don't provide this.

      That said, personally I find many people don't need to worry as much about clustering, so as long as you are working on a good environment, thats probably more important. I use hibernate more these days with a good solid MVC design. I have servlets set to start at boot that become by queue listeners, and it works quite well. I can use XDoclet to generate my hibernate mappings if I want, and get up and running quickly.

      The good thing is that you have alot of options. The bad thing is that you have a lot of options.

      It comes down to picking the right technology for the job.. and your team. JDBC, JDO, OR-Mapping, EJB, etc all provide good tools to complete the job.