Tags:Red Hat, JBoss, 4.0.5 GA, Clustering, javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: topic not bound]
Hi, I am very new to Appserver (JBoss) clustering. I want to know what all changes do i have to do in the JBoss files so as to configure it in a clustered environment. I am using JBoss 4.0.5GA. When i run the second node, i get the following exception in the server console (however the first node runs fine): javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: topic not bound. I have attached the trace of the exception.
could you provide your acs.ias.rs.environment.ServerEnvironment.xml file? it has to do with some configuration staff inside your application now.
JMS clustering in jboss is implemented in some special way. There is one master JMS node where all topics and queues are situated, and other nodes are just like clients. And you should use JmsXA connection factory in order to reach topics and queues.
- To create a clustered environment , you will need to create 1 or more server nodes. The 'all' server is the only server configuration which has clustered support by default. So you should use that . - Copy the 'all' folder from <JBOSS_HOME>\server\ and paste it under a new name say node1 in the same folder. - Jboss provides a few preconfigured server settings so as to avoid the port conflicts. So, take advantage of this. - In this newly created directory : <JBOSS_HOME>\server\node1, go to node1\conf\jboss-service.xml - Uncomment the ServiceBindingManager configurations so that <attribute name="ServerName">ports-01</attribute> is used.
This serverName configuration points to ports-01 defined in docs/examples/binding-manager/sample-bindings.xml.
- This xml file consists of sample servers like port-01,port-02 which you can use in your clustered environment. - So to add another node to the cluster simply repeat , create node2 and set its name to port-02.
Additional info :
- Start jboss using a server configuration run node1 ( this will begin the node1 server) - Start jboss using clustered confiugration run -c node1 ( this will begin node1 as the first in the cluster)
Suppose you deploy your ear into an external jboss container ( which is on another machine ) and you are not able to access it via your local machine even though the container is up and running try this : - Start jboss using a cluster bound on a specific ip do a : run -c node1 -b <i.p.address>
This will bind the specific node1 to the ipaddress of that machine so that you can access it via any external machine.