1 2 Previous Next 15 Replies Latest reply on Jan 31, 2006 10:42 PM by chetan aggarwal

    Is it necessary to use HAJMS when on a cluster?

    Fredrik Israelsson Newbie

      Another question:

      Is it necessary to utilize HAJMS when deploying a system that has some components that communicate throught JMS on a cluster?
      What happens if I deploy an ordinaary JMS configuration on each node in the cluster, skipping the HAJMS part?
      I know that the persistence manager on each node would communicatie with the database (which resides on a separate machine), and that that might inflict performance, but the expected load is rather low right now.
      The good thing with this kind of deployment is that I would probably get it to work earlier than what would be the case with HAJMS.

      Is it possible to do this?

      Are there some bad consequences that I should be aware of?

      Regards,
      Fredrik Israelsson

        • 1. Re: Is it necessary to use HAJMS when on a cluster?
          Fredrik Israelsson Newbie

          I will not have any durable subscribers in my application. To begin with, I would also like to make it work without security management.
          Does this mean that I should be able to remove the state manager? It would be nice to make things work without using the Hypersonic database at all.
          A first step could be to only use persistence for the message cache, and not for users, passwords and states.
          Is this possible?
          I have tried, but I get DLQ errors when I start to edit or remove configuration files for state management.

          • 2. Re: Is it necessary to use HAJMS when on a cluster?
            Fredrik Israelsson Newbie

            I am using JBoss version 3.2.6RC1, by the way.

            • 3. Re: Is it necessary to use HAJMS when on a cluster?
              xavierpayne2 Newbie

              Actually HA jms is much easier to get working than you might think... If you use the ALL configuration of JBoss 4.0 for example its up and going out of the box. The ONLY change you would need to make in your clients is setting the jnp url your clients use to connect from:

              jnp://localhost:1099

              to

              jnp://localhost:1100

              And then your JMS clients should work out of the box!!!!!! :).

              For more details on HAJMS goto this link:
              http://www.jboss.org/wiki/Wiki.jsp?page=JBossMQHA

              If you deploy a standalone JMS server on each an every node... You will have to roll your own client code to handle failover and the like. You will also have to make sure your subscribers to the same server as the publisher in order to get their subscriptions. Or you could do something hokey and have your subscribing clients actually have Subscriptions on every server and then no matter what server the publishers were publishing to they would still get their subscriptions.

              It wasn't clear from your post though if you are using JMS clients outside the container or if you are using Message Driven Beans. I have not yet used MDBs with clustering so your mileage may vary there.

              • 4. Re: Is it necessary to use HAJMS when on a cluster?
                Fredrik Israelsson Newbie

                Thanks, but it is not quite that easy for me.
                Firstly, I am stuck with version 3.2.6RC1 for a while. Upgrades can't be made that fast and easy because of other systems deployed.

                Secondly, I have to use another database for the persistence manager than Hypersonic (Hsqldb). I have to use MySQL instead, for performance and stability reasons.

                With these changes, and the rest pretty much out of the box, it does apparently not work correctly.

                /Fredrik Israelsson

                • 5. Re: Is it necessary to use HAJMS when on a cluster?
                  xavierpayne2 Newbie

                  We are also using MySQL as our backend database for both JMS and our Entity beans.

                  did you delete the

                  all\deploy-hasingleton\jms\hsqldb-jdbc2-service.xml

                  file and replace it with a suitable MySQL one?
                  I copied and pasted the one found in

                  docs/examples/jms/mysql-jdbc2-service.xml

                  be sure to change the attribute:

                  <depends optional-attribute-name="ConnectionManager">

                  to point to your MySQL Datasource name.

                  Also worth noting is to leave the file

                  all\deploy-hasingleton\jms\hsqldb-jdbc-state-service.xml

                  as is. Don't delete it or try to replace it even if you plan to use MySQL. I tried to replace it early on and only got trouble. I think this file stores the non-replicatable state of the JMS singleton server itself (non message queue stuff). So leaving it as hsqldb shouldn't hurt anything.

                  If you have already done all this and are having problems. I would still like to try to help you. But I am afraid I still don't have enough details about what things you have tried, what errors or exceptions (if any) you are getting, and what kind of JMS clients you have. (for example standalone java client subscribers, or MDBs?).

                  If you run JMS on each node individually be aware that you will have to have different mysql instances for each ones queue... Or at the very least modify the sql for each jms server so that each queue is in a different database... Otherwise your non clustered JMS Servers are going to get confused.

                  • 6. Re: Is it necessary to use HAJMS when on a cluster?
                    Fredrik Israelsson Newbie

                    Thanks for the help! I tried to configure things like You suggested, and it finally seems to work.

                    I can not continue to use the Hypersonic database for the state manager, though. I have to try to make it work with a more reliable database manager.
                    One thing with MySQL is that it does not suport two phase commit. What does that do to the reliability for the state manager? Is it possible to disable two phase commit for JMS in JBoss? What would happen if it is and if I did disable it?

                    /Fredrik

                    • 7. Re: Is it necessary to use HAJMS when on a cluster?
                      xavierpayne2 Newbie

                      Hey I don't know if you are still interesting in doing this... (parallelizing JMS in your cluster instead of using it as an HA Singleton) if you are still interested let me know...

                      We've succeeding in doing it here. With a few caveats we are willing to live with.

                      Its not hard to do at all (I might post a howto in the forums)

                      The scalability is freakin awesome.

                      • 8. Re: Is it necessary to use HAJMS when on a cluster?
                        Sergey Vasiljev Newbie

                         

                        "DashV" wrote:
                        Hey I don't know if you are still interesting in doing this... (parallelizing JMS in your cluster instead of using it as an HA Singleton) if you are still interested let me know...

                        We've succeeding in doing it here. With a few caveats we are willing to live with.

                        Its not hard to do at all (I might post a howto in the forums)

                        The scalability is freakin awesome.


                        Hi DashV,

                        Could you please share your experience with JSM parallelizing, I'm a bit confused now...


                        Thanks in advance
                        //sv

                        • 9. Re: Is it necessary to use HAJMS when on a cluster?
                          Sergey Vasiljev Newbie

                           

                          "sv" wrote:

                          Hi DashV,

                          Could you please share your experience with JSM parallelizing, I'm a bit confused now...


                          Thanks in advance
                          //sv


                          the request is closed - with help of JBoss expetienced person I managed JMS parallelizing - pitty that examples provided in wiki does not work at all on JBoss 4.0\4.0.1

                          • 10. Re: Is it necessary to use HAJMS when on a cluster?
                            Sacha Labourey Master

                             

                            "sv" wrote:
                            the request is closed - with help of JBoss expetienced person I managed JMS parallelizing - pitty that examples provided in wiki does not work at all on JBoss 4.0\4.0.1


                            can you then please update the wiki.

                            cheers,

                            sacha



                            • 11. Re: Is it necessary to use HAJMS when on a cluster?
                              Sergey Vasiljev Newbie

                               

                              "sacha.labourey@jboss.com" wrote:
                              n please update the wiki.

                              cheers,

                              sacha




                              ok , but now I have only examples with external client connected to clustered queue - not MDB \ MBean - with this I could not yet find a sollution (seems to be I missed something in hajndims... :( )


                              if you are interested in external clients working examples - I can do so

                              could you please give me a hint what is the possible reason - deployed MBean failed to allocate Queue - but the "same" code running as external client - runs well
                              .

                              //sv

                              • 12. Re: Is it necessary to use HAJMS when on a cluster?
                                Sacha Labourey Master

                                You need to show us your JNDI lookup code (from your mbean) for both your ConnectionFactory and your Queue, you are probably not looking for the good name.

                                • 13. Re: Is it necessary to use HAJMS when on a cluster?
                                  Mark Mindenhall Newbie

                                  Hey DashV -- If you're still copied on replies to this topic, I am very interested to find out how you "parallelized" JMS in a clustered environment. I need to have JMS running independently on each node of my cluster.

                                  Thanks!

                                  • 14. Re: Is it necessary to use HAJMS when on a cluster?
                                    Jimy Liu Newbie

                                    Hi,

                                    Where can I find the document for JMS paralelizing ?
                                    Thanks.

                                    Jimy

                                    1 2 Previous Next