ibm-messaging / mq-jms-spring

Components to assist MQ JMS integration with Spring frameworks
Apache License 2.0
190 stars 102 forks source link

application name as properties improvment #20

Closed ruzsicsg closed 5 years ago

ruzsicsg commented 5 years ago

That is not a bug, but it's diffiult to identity an application, who is listening on queue, when you have more then 10... becose all of them have the name "jar". If you makes these changes, you can set the name, for the application in the config file. :-)

In MQConfigurationProperties -->

/**
     * Application Name
     */
    private String applicationName = "jar";

      public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

<--

In MQConnectionFactoryFactory

<--


if(properties.getApplicationName()!=null){
        cf.setAppName(properties.getApplicationName());
      }

-->

ibmmqmet commented 5 years ago

MQ should - by default - use the name of the main class of the application as the basis of the application name when connecting as a Java client. But it's reasonable to make it a configurable property, especially as MQ V9.1.2 starts to make real use of the application name, albeit for non-Java programs in that release.

I'll add something like this code change for the next update to the boot file.

ruzsicsg commented 5 years ago

Thank you!

ibmmqmet commented 5 years ago

Delivered in 2.1.1