How can we achieve JVM clustering in standalone Java apps? Is thi开发者_如何学Cs a possiblity:
We create a JMS queue and deploy it on a server. Now we make all the Java apps connect remotely using weblogic jndi parameters to that queue. When a message is delivered to a queue, only one of the java apps (jms clients) will receive the message because of the very nature of a queue(as opposed to topic). Thus, load balancing a.k.a clustering can be achieved.
Is this a viable way of approaching the solution?
That approach sounds viable, and it does give you simple load balancing.
Nobody can say whether it is the best approach because you've given almost no details of what you are trying to do.
(I would not have said that "load balancing" and "clustering" are the same thing though. You can do load balancing using cluster computing, but there are other ways to do this and there are other uses for cluster computing. Refer to the linked articles for details.)
精彩评论