@@ -23,7 +23,7 @@ import (
23
23
//
24
24
// This method reads the following files;
25
25
// - $HOME/Downloads/connection_info.json for host/port/channel information
26
- // - $HOME/Downloads/applicationApiKey .json for username/password information
26
+ // - $HOME/Downloads/apiKey .json for username/password information
27
27
//
28
28
// If your queue manager is hosted on the IBM MQ on Cloud service then you can
29
29
// download these two files directly from the IBM Cloud service console.
@@ -42,7 +42,7 @@ func CreateConnectionFactoryFromDefaultJSONFiles() (cf ConnectionFactoryImpl, er
42
42
// the file as the two parameters. If empty string is provided then the default
43
43
// location and name is assumed as follows;
44
44
// - $HOME/Downloads/connection_info.json for host/port/channel information
45
- // - $HOME/Downloads/applicationApiKey .json for username/password information
45
+ // - $HOME/Downloads/apiKey .json for username/password information
46
46
//
47
47
// If your queue manager is hosted on the IBM MQ on Cloud service then you can
48
48
// download these two files directly from the IBM Cloud service console.
@@ -87,7 +87,7 @@ func CreateConnectionFactoryFromJSON(connectionInfoLocn string, apiKeyLocn strin
87
87
return ConnectionFactoryImpl {}, err
88
88
}
89
89
90
- var qmName , hostname , appChannel string
90
+ var qmName , hostname , appChannel , appName string
91
91
var port int
92
92
93
93
qmName , errQM := parseStringValueFromJSON ("queueManagerName" , connInfoMap , connectionInfoLocn )
@@ -110,6 +110,11 @@ func CreateConnectionFactoryFromJSON(connectionInfoLocn string, apiKeyLocn strin
110
110
return ConnectionFactoryImpl {}, errChannel
111
111
}
112
112
113
+ appName , errAppName := parseStringValueFromJSON ("applicationName" , connInfoMap , connectionInfoLocn )
114
+ if errAppName != nil {
115
+ return ConnectionFactoryImpl {}, errAppName
116
+ }
117
+
113
118
// Now unmarshall and parse out the values from the api key file (that
114
119
// contains the username/password credentials).
115
120
var apiKeyMap map [string ]* json.RawMessage
@@ -140,6 +145,7 @@ func CreateConnectionFactoryFromJSON(connectionInfoLocn string, apiKeyLocn strin
140
145
ChannelName : appChannel ,
141
146
UserName : username ,
142
147
Password : password ,
148
+ ApplName : appName ,
143
149
}
144
150
145
151
// Give the populated ConnectionFactory back to the caller.
0 commit comments