4 Replies Latest reply on Mar 11, 2005 9:36 PM by Ben Wang

    Clustering for POJOs

    Abby Pad Newbie

      We have a application that runs on jboss 3.2.6. It mainly uses plain old java objects for almost everything - including database updates/inserts (java class with jdbc - only uses the jdbc connection pooling app server service).

      We want to scale and I am wondering about the options:
      1. Should I convert my java objects to stateless session beans in order to deploy them in a cluster? Are there other options?
      2. Alternately can I upgrade to jboss 4.0, and use AOP to inject clustering aspects into my java objects?
      3. Is JMS (topics/queues/mdbs) recommended in a jboss cluster?

      We are still in the very high level architecture evaluation phase , so any input is appreciated.

      Thanks, Abby.

        • 1. Re: Clustering for POJOs
          Ben Wang Master

          It really depends if you have state in your POJO. If not, SLSB is great for load balancing.


          • 2. Re: Clustering for POJOs
            Abby Pad Newbie

            I have some state - but it is not necessarily related to the session. Basically there is a hashmap that contains lot of information about different clients, but any client can have access to it.

            So, can I make this into a stateless session bean? If so, will I lose my hashmap contents during a fail-over?

            • 3. Re: Clustering for POJOs
              Abby Pad Newbie

              To give some more info, I have this cache class which contains a hashmap that the client can talk to and pickup whatever is assigned to it (based on the key value). What I would really like to do is to share this cache among the entire cluster, such that no matter which app server instance the request lands on, it will be able to have the right and latest information about the cache.

              Two considerations are:
              1. We dont want to change the logic inside the class.
              2. It is okay to change the form of the class (ie, convert to EJB).

              Any ideas are appreciated.

              • 4. Re: Clustering for POJOs
                Ben Wang Master

                Sounds like to me JBossCache is what you need (coupled with a SLSB for load balancing, e.g.). :-)