8 Replies Latest reply on Apr 11, 2008 3:07 AM by Abhishek Kalsy

    topic not bound in HAJMS

    Ana Holzbach Newbie

      Hi,

      We're using JBoss 4.2.0.GA. We have two nodes running a flex-based application that calls some business methods on clustered ejbs, which in turn use JMS to update state on the client. I've setup a named partition (LCSTest) with two nodes, and gave this partition its own multicast address (there are other partitions in the network). The JMS topics are deployed in deploy-hasingleton in both nodes and the nodes are configured to access the same SQL Server datasource for JMS data.

      The beans are annotated as follows:

      @Stateless
      @TransactionManagement
      @Local(BedManagementService.class)
      @Remote(BedManagementService.class)
      public class BedManagementServiceBean implements BedManagementService {
      
       @Resource
       private SessionContext mSessionContext;
      
       @Resource(mappedName = "TopicConnectionFactory")
       private ConnectionFactory mJmsConnectionFactory;
      
       @Resource(mappedName = "topic/RoomService/BedStaffUpdate")
       private Topic mStaffUpdateTopic;
      ...
      
      }


      and jboss.xml has these contents:

      <jboss>
       <enterprise-beans>
       ...
       <session>
       <ejb-name>BedManagementServiceBean</ejb-name>
       <resource-ref>
       <res-ref-name>TopicConnectionFactory</res-ref-name>
       <jndi-name>jnp://${jboss.bind.address:localhost}:1100/TopicConnectionFactory</jndi-name>
       </resource-ref>
       <resource-ref>
       <res-ref-name>topic/RoomService/StaffUpdate</res-ref-name>
       <jndi-name>
       jnp://${jboss.bind.address:localhost}:1100/topic/RoomService/BedStaffUpdate</jndi-name>
       </resource-ref>
       <clustered>True</clustered>
       <cluster-config>
       <partition-name>
       ${jboss.partition.name:DefaultPartition}</partition-name>
       <bean-load-balance-policy>
       org.jboss.ha.framework.interfaces.RoundRobin</bean-load-balance-policy>
       </cluster-config>
       </session>
       </enterprise-beans>
      
      </jboss>


      I've deployed the hajms-examples.jar in a third server to test the two nodes in the cluster, and successfully verified that the setup was working.

      JNDIView lists all the beans in both nodes, but lists the topics only in the singleton master, which makes sense. But the topics are only available in the singleton master. The node that is not the master gets an NameNotFoundException "topic not bound".

      Any suggestions will be much appreciated. Thanks !

      Ana