umm... have not tried jboss 4, but on 3.2.6 its quite straight forward, just start jboss with -c all and the servers can see each other, i have one running on my winxp workstation and another on a solaris 9... would it be your linux box is blocking multicasts or dont have multicast setup properly, are those 2 box on a different network ? Hope this helps a bit..
Can you please tell the step by step implementaion of clustering. I am looking to implement it in the Linux box. But still dont know how to start.
Plese help me
than in advance,
like i said, afaik 3.2.6, clustering is already enabled by default when you star the server with a -c all option. If you start another instance on another machine with a -c all, you can see on the console that both the servers are visible to each other as long as on the network level the multicast address they use are routable between the 2 networks each machine is in..
The simplest case is for testing would be to put both machines on the same network on the same hub/switch. Also most linux distros will have a firewall installed by default that may block multicasts depending on the options you set when installing... so if you cant get the cluster to work, does not necessarily mean jboss is not working, check your network and your os setting... heh you can even install a linux kernel without multicast support..
As far as using the clusters, i've so far only tested EJB fail over, basically you just need to configure your EJB as clusterable in the jboss.xml file as such,
<?xml version="1.0" encoding="UTF-8"?> <jboss> <enterprise-beans> <session> <ejb-name>MyEJB</ejb-name> <jndi-name>MyEJB</jndi-name> <clustered>true</clustered> </session> </jboss>
Also, in your ejb lookup code (i.e. the client), you need the following jndi properties
Notice , we dont specify a provider url i.e. jnp://localhost:1099 because we dont want to be tied to a specific jboss server.
Anyway thats all i've experienced so far. If you want http fail over and session replication, i believe thats between your web server and tomcat which is another topic altogether. Cheers
oh, on another note, i believe farming is not enabled by default in 3.2.6. So i had to deploy my ejb on each jboss instance manually... you can configure farming but i havent tried so cant help you there..
Thak You Stev.
Thank you for the last replay. I did in the the way you said, and the servers communicating each other too. But my problem is I need to deploy an application as EAR. It contains both EJB and JSPs. The EJBs are in a JAR file and JSP and rest in the WAR file. Can I do the fail over feature for my application through just changing the deployment descriptor. Waiting for your replay.
Thanx in advance.
Can any one help me ?
I post one topic here but nobody replied yet.
I am trying to run the clustering service in jboss 3.2.6 and i have one problem to solve: How can i call the cluster? i mean:
I know how to call an specific machine in the cluster.
Machine 1: http://10.71.198.20:8080/project/jsp/AddressMnt.jsp?ACAO=EXIBIRFLT
Machine 2: http://10.71.198.21/project/jsp/AddressMnt.jsp?ACAO=EXIBIRFLT , and so on...
But i think that i have to call the cluster instead of calling the specific machine.
For example: http://cluster_address/projeto/jsp/EnderecoMnt.jsp?ACAO=EXIBIRFLT.
This way, i think that the fail over process is possible.
can you help me?
You are confusing load balancing with fail over. If you are running from the web front, you will need either a hw load balancer or sw load balancer (e.g., Apache mod_jk).
Please check http://www.jboss.org/wiki/Wiki.jsp for details.