4 Replies Latest reply on Dec 19, 2003 5:30 PM by juha

    general clustering question

    rdoust

      What do I need to read to know how this stuff works? (Source code?)
      Please tell me if I'm crazy. I haven't yet worked with a cluster and I'm telling a client that this scenario is not a problem.
      The client is Smalltalk and controls DB transaction boundaries. The client talks HTTP to my servlet that talks to a stateful session bean that maintains state of client's DB transactions. The EJB talks JDBC to the database. (It's a port of an existing system and all of the SQL is easier ported to JDBC than anything else I think).
      The question is, if the client makes a request in the middle of some "long" DB transaction, and for some reason the request dies at the server (i.e., server dies untimely death while hitting DBMS), does the software that supports the clustering behavior redirect the request to another node on the cluster? It sounds so stupid, I think that's exactly what a cluster is for, but maybe I'm wrong. Other people I know who are smart say that I'm wrong. They tell me that as soon as a client request is given to a node to process, the clustering assumes that it's job is done.
      My theory is that as long as the transaction information is being stored and accessed via JNDI (I never did bean managed transactions, but I guess that's what will happen) and as long as that transaction data is being replicated across the cluster, then the client will very likely be able to continue and hopefully complete her DB transaction never having been the wiser.
      If this is all just too stupid to respond to, please recommend a source of reading and I will be happy to read all about it!!
      Thansk

        • 1. Re: general clustering question

          The stateful session data is replicated across cluster as the transaction commits. You get both load balancing and failover from the smart proxies between the servlet and the stateful session bean. However, since people most often use embedded servlet container this is of questionable benefit.

          You don't give details how your clients connect to the servlets, most often there's a web server with mod_jk installed with it. This gives you load-balancing but no failover.

          HTH

          • 2. Re: general clustering question
            airsquig

            Hello RDoust,

            If you have not seen it yet, there is a JBoss Clustering document as part of the doc subscription. It is a good overview for clustering in jboss. I beleive you can purchase just that doc if you do not want the subscription.

            • 3. Re: general clustering question
              rdoust

              I'm in the process of trying to upgrade my subscription to the JBoss docs, but the sales people at component source haven't responded to my inquiry yet, so I haven't been able to check out the doc on clustering. Juha, thanks for your reply and your book on JMX, my bible.
              According to the EJB spec, the stateful session bean can begin a transaction in one business method and commit it in a different business method. What I need to know is, is the state of the UserTransaction replicated across the cluster independent of the state of the stateful session bean? If an insert was accomplished by the ssb within the view of the transaction before communication failed, causing the proxy to send the request to another instance of the ssb, will there be another attempt to insert?
              Thanks.

              • 4. Re: general clustering question

                Insert as in database insert?