[jboss-user] [Messaging, JMS & JBossMQ] - Cluster nodes fails to correctly deploy JMS Topic

zdev do-not-reply at jboss.com
Tue Apr 29 10:57:33 EDT 2008


We are currently using JBoss 4.0.5.GA_CP06.  In one of our customer deployments, there is a two node cluster.  We are seeing one of the nodes come up with no problem, but the other node comes up and fails to correctly deploy our JMS topic.  The error in the stdout log is:


20:30:17,718 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.mq.destination:service=Topic,name=Singlecast
  State: CONFIGURED
  I Depend On:
    jboss.mq:service=DestinationManager

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.mq:service=DestinationManager
  State: NOTYETINSTALLED
  Depends On Me:
    jboss.mq.destination:service=Topic,name=Singlecast


I did some research on this, and I found something that said this would happen when using HAJMS and the topic was deployed in the server/[cluster]/deploy directory.  It said to deploy the topic in the server/[cluster]/deploy-hasingleton directory instead.  So I moved the destination service file accordingly.  Here is that file:

<!-- singlecast-destination-service.xml --> <?xml version="1.0" encoding="UTF-8"?> 
	
		<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
	



We now no longer get the error above, but we still see one of the nodes come up just fine, and the other node fail.  Only now it fails within our own code.  Specifically, it fails because "ConnectionFactory not bound".  I am assuming I have not specified the JNDI name correctly, but I don't know what it is supposed to be.  Here is how it configured right now:


<!-- from web.xml -->
	<resource-ref>
		Singlecast Topic
		<res-ref-name>jms/SinglecastTopic</res-ref-name>
		<res-type>javax.jms.Topic</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>
	<resource-ref>
		Singlecast Topic Connection Factory
		<res-ref-name>jms/SinglecastTopicConnectionFactory</res-ref-name>
		<res-type>javax.jms.TopicConnectionFactory</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>


<!-- from jboss-web.xml -->
	<resource-ref>
		<res-ref-name>jms/SinglecastTopic</res-ref-name>
		<jndi-name>topic/Singlecast</jndi-name>
	</resource-ref>
	<resource-ref>
		<res-ref-name>jms/SinglecastTopicConnectionFactory</res-ref-name>
		<jndi-name>ConnectionFactory</jndi-name>
	</resource-ref>


// from Java code
            InitialContext ctx = new InitialContext();
            TopicConnectionFactory factory = (TopicConnectionFactory) ctx.lookup("ConnectionFactory");
            _conConnection = factory.createTopicConnection("guest", "guest");
            _tpcTopic = (Topic) ctx.lookup("topic/Singlecast");
            _sesSession = _conConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
            TopicSubscriber sub = _sesSession.createSubscriber(_tpcTopic);
            sub.setMessageListener(this);
            _conConnection.start();

Is there something wrong with what we are doing?  Why would one of the nodes come up successfully but the other one not be able to find the JNDI name?  Anything you could do to point us in the right direction would be very helpful.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147533#4147533

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147533



More information about the jboss-user mailing list