1 Reply Latest reply on Sep 28, 2009 10:08 AM by vickirk

    Problem load balancing JMS

    vickirk

      I'm having a bit of trouble load balancing my message producing SSBs and my MDBs under jboss 4.2.1. I have got a singleton JMS successfully switching between nodes when I shut the active one down so hopefully I'm almost there.

      However, my SSBs fail when trying to get the connection factory for the queue if they are not on the node running the jms instance. These a re EJB3 beans, the connection factory for my SSB is injected via

      @Resource(mappedName="ConnectionFactory")
      private QueueConnectionFactory connectionFactory;


      and the code that fails is

      InitialContext ctx = new InitialContext();
      QueueConnection qu = connectionFactory.createQueueConnection();
      QueueSession session = qu.createQueueSession(false,
       Session.AUTO_ACKNOWLEDGE);
      Queue queue = (Queue) ctx.lookup("queue/SystemLogQueue")


      Presumably I need to make this refer to the HAJNDI?

      Can anyone recommended the best way to make this maintainable so it can be deployed under a clustered/non-clustered environment with the least effort?

      Kind Regards, Vic


        • 1. Re: Problem load balancing JMS
          vickirk

          I believe I've got this sorted,

          @Resource(mappedName="ConnectionFactory")


          to

          @Resource(mappedName="java:/JmsXA")


          appears to do the trick, for some reason I thought this was only going to be available when clustered.