Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5523

JMSSender executes unnecessary JNDI lookups

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • JMS transport
    • None

    Description

      JMSSender contains the following code:

      jmsOut = new JMSOutTransportInfo(targetAddress);
      // do we have a definition for a connection factory to use for this address?
      jmsConnectionFactory = getJMSConnectionFactory(jmsOut);
      if (jmsConnectionFactory != null) {
      messageSender = new JMSMessageSender(jmsConnectionFactory, targetAddress);
      } else {
      ...
      }

      The constructor of JMSOutTransportInfo will create a new InitialContext and lookup the destination from JNDI. If a connection factory definition is found (jmsConnectionFactory != null), this is unnecessary because the JMSMessageSender constructor will also create a new InitialContext (or reuse a cached one) and carry out the JNDI lookup again.

      Attachments

        1. TRANSPORTS-1-update1.patch
          5 kB
          Hiranya Kasub Jayathilaka
        2. TRANSPORTS-1.patch
          4 kB
          Hiranya Kasub Jayathilaka

        Issue Links

          Activity

            People

              Unassigned Unassigned
              veithen Andreas Veithen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: