Skip to content

Commit 035a353

Browse files
author
Tom Barnes
authored
minor jms sample change so it implicitly follows best practices: eliminate use of long deprecated 'session pool' and 'weighted dist dest' features, plus ensure all destinations are targeted using 'subdeployments'. (#885)
1 parent 6e0ca90 commit 035a353

File tree

2 files changed

+11
-29
lines changed

2 files changed

+11
-29
lines changed

core/src/test/resources/simple-demo-jms-full.yaml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,6 @@ resources:
101101
PersistentStore: FileStore1
102102
JMSServer2:
103103
Target: m2
104-
JmsSessionPool:
105-
myPool:
106-
ConnectionFactory: myFactory
107-
ListenerClass: myClass
108-
JmsConnectionConsumer:
109-
myConsumer:
110-
MessagesMaximum: 4
111-
Notes: Pool notes
112104
JmsMessageLogFile:
113105
FileCount: 2
114106
Notes: message log notes
@@ -120,6 +112,10 @@ resources:
120112
Target: JMSServer1
121113
JMSServer2Subdeployment:
122114
Target: JMSServer2
115+
JMSServersSubdeployment:
116+
Target: JMSServer1,JMSServer2
117+
SAFSubdeployment:
118+
Target: MySAFagent
123119
JmsResource:
124120
ConnectionFactory:
125121
WebAppConnectionFactory:
@@ -149,26 +145,6 @@ resources:
149145
KeyType: Double
150146
Property: PurchaseAmount
151147
SortOrder: Descending
152-
DistributedQueue:
153-
MyDistributedQueue:
154-
ForwardDelay: 88
155-
JNDIName: jms/MyDistributedQueue
156-
ResetDeliveryCountOnForward: false
157-
SafExportPolicy: All
158-
DistributedQueueMember:
159-
Queue1:
160-
Weight: 50
161-
Queue2:
162-
Weight: 50
163-
DistributedTopic:
164-
MyDistributedTopic:
165-
JNDIName: jms/MyDistributedTopic
166-
SafExportPolicy: None
167-
DistributedTopicMember:
168-
Topic1:
169-
Weight: 50
170-
Topic2:
171-
Weight: 50
172148
ForeignServer:
173149
MyForeignServer:
174150
ConnectionURL: 't3://my.other.cluster:7001'
@@ -261,12 +237,14 @@ resources:
261237
JNDIName: jms/myUDQ
262238
ResetDeliveryCountOnForward: true
263239
SafExportPolicy: All
240+
SubDeploymentName: JMSServersSubdeployment
264241
UniformDistributedTopic:
265242
MyUniformDistributedTopic:
266243
DefaultTargetingEnabled: true
267244
JmsCreateDestinationIdentifier: CDI4
268245
JNDIName: jms/myUDT
269246
SafExportPolicy: None
247+
SubDeploymentName: JMSServersSubdeployment
270248
SAFRemoteContext:
271249
MyRemoteSAFcontext:
272250
SAFLoginContext:
@@ -283,12 +261,14 @@ resources:
283261
MessageLoggingParams:
284262
MessageLoggingEnabled: true
285263
MessageLoggingFormat: '%header%,%properties%'
264+
SubDeploymentName: SAFSubdeployment
286265
SAFTopic:
287266
MyRemoteSAFtopic:
288267
RemoteJndiName: jms/myUDQ
289268
MessageLoggingParams:
290269
MessageLoggingEnabled: true
291270
MessageLoggingFormat: '%header%,%properties%'
271+
SubDeploymentName: SAFSubdeployment
292272
MessageLoggingParams:
293273
MessageLoggingEnabled: true
294274
MessageLoggingFormat: '%header%,%properties%'

core/src/test/resources/simple-demo-jms.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ resources:
6060
Target: JMSServer1
6161
JMSServer2Subdeployment:
6262
Target: JMSServer2
63+
JMSServersSubdeployment:
64+
Target: JMSServer1,JMSServer2
6365
JmsResource:
6466
ConnectionFactory:
6567
WebAppConnectionFactory:
@@ -86,9 +88,9 @@ resources:
8688
XAConnectionFactoryEnabled: true
8789
UniformDistributedQueue:
8890
MyUniformDistributedQueue:
89-
DefaultTargetingEnabled: true
9091
JNDIName: jms/myUDQ
9192
ResetDeliveryCountOnForward: true
93+
SubDeploymentName: JMSServersSubdeployment
9294
# This is a comment
9395
appDeployments:
9496
Application:

0 commit comments

Comments
 (0)