Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3630

JMSTransportSupport is not portable across different JMS providers.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • JBossAS-4.0.4.GA
    • Web Services
    • None
    • Workaround Exists
    • Hide

      Users of JMSTransportSupport can override the processSOAPMessage method and call the super implementation but pass in the correct destination name.

      Show
      Users of JMSTransportSupport can override the processSOAPMessage method and call the super implementation but pass in the correct destination name.

      JMSTransportSupport is not portable across different JMS providers, the queue name is retrieved using the following code: -

      String fromName = null;
      Destination destination = message.getJMSDestination();
      if (destination instanceof Queue)
      fromName = "queue/" + ((Queue)destination).getQueueName();
      if (destination instanceof Topic)
      fromName = "topic/" + ((Topic)destination).getTopicName();

      For JBossMQ this is fine and it results in a name that matches the JNDI name of the queue, for WebSphereMQ this returns the name of the queue as configured on WebSphere not the JNDI name the queue is bound to in JBoss.

      The Javadoc for Queue describes the getQueueName as not being suitable for portable clients: -

      http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Queue.html

      A more portable solution could be to lookup a variable in the ENC that contains the name of the web service, this could either be provided by the user deploying the MDB or the web service deployer could bind a value to the ENC of the message driven bean as the web service is deployed.

            darran.lofthouse@redhat.com Darran Lofthouse
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: