-
1. Re: question on clustering
brian.stansberry Sep 17, 2007 10:13 AM (in response to haribaasha)You can't exclude 2, 3 or 4 via some operation on 1. If you don't want to shut down 2, 3 or 4 you can undeploy the EJB on one of them.
-
2. Re: question on clustering
haribaasha Sep 18, 2007 8:28 AM (in response to haribaasha)here is how i setup the cluster itself
i added the ip's of the other machines to the initial_hosts list in the cluster-service.xml of that machine. Is tat all ?
<TCPPING initial_hosts="10.1.30.201[7800]" port_range="3"
timeout="3000"
down_thread="false" up_thread="false"
num_initial_members="3"/>
incase i want to add/delete a node from a cluster itself i have to manually remove the ip entry from the cluster-service.xml of every machine ? -
3. Re: question on clustering
brian.stansberry Sep 18, 2007 9:52 AM (in response to haribaasha)If you want automatic discovery of members, you can use multicast-based MPING instead of TCPPING: http://wiki.jboss.org/wiki/Wiki.jsp?page=JGroupsMPING.
Regular traffic between the members would still use TCP; UDP multicast is used when a node joins the cluster and needs to dynamically discover the cluster members.
With TCPPING, yes, you should list all members. -
4. Re: question on clustering
haribaasha Sep 18, 2007 10:12 AM (in response to haribaasha)thanks alot, i will check mping.
with mping i wont have to have the ips of the other machines in the service and hajndi wud work across the nodes in the cluster? that is the machines with the ejb deployed will be clustered for the service automaticallly ? -
5. Re: question on clustering
brian.stansberry Sep 18, 2007 10:24 AM (in response to haribaasha)Correct.
Note that none of this changes my response to your first question. If you want to take the EJB on 2, 3 or 4 out of the cluster, you need to either undeploy it on that node or shut down that node. -
6. Re: question on clustering
haribaasha Sep 19, 2007 12:24 AM (in response to haribaasha)one last question , in my setup i mentioned in the first post i want the servers 2,3 and 4 to have a different partition name and 1 (central server which routes the requests to 2,3,4) to have a different partition name. is this possible ? or will this result in the lookup failing ?
-
7. Re: question on clustering
brian.stansberry Sep 21, 2007 1:02 PM (in response to haribaasha)Yes, they can be in separate partitions. But, your client on node 1 will not be able to query it's own HA-JNDI to find the EJB, because its HA-JNDI will not have visibility to 2/3/4.
Simplest way to deal with this is to pass environment properties to your InitialContext to tell it how to find HA-JNDI on the 2/3/4 partition. E.g.Hashtable env = new Hashtable(); // We want to discover the 234Partition env.put("jnp.partitionName", "234Partition"); // The 234Partition is using a different mcast address than we are env.put("jnp.discoveryGroup", getMulticastAddressFor234Partition()); Context ctx = new InitialContext(env);
You could also encapsulate the above 2 properties in a .properties file and load them from the file. Don't call that file jndi.properties though!!
See http://wiki.jboss.org/wiki/Wiki.jsp?page=NamingContextFactory for more on these properties. -
8. Re: question on clustering
haribaasha Sep 24, 2007 2:52 AM (in response to haribaasha)Instead of
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI
// port
initial = new InitialContext(p);
i did this :
Hashtable env = new Hashtable();
env.put("jnp.partitionName", "IndicsPartition");
env.put("jnp.discoveryGroup", "230.0.0.5" );
initial = new InitialContext(p);
and i changed the ip in the indicspartition machine to 230.0.0.5
i got a communication exception on the client side ??
is this all or am i missing something ? -
9. Re: question on clustering
haribaasha Sep 24, 2007 5:25 AM (in response to haribaasha)am sorry , its working perfectly fine. i had screwed up with the partition name in the second partition :)
thanks a lot!