Commit 147e0f2
committed
Handle JMX Collisions
Previously, if two DefaultConnectionContexts were created in a single JVM,
registration of the JMX ByteBuf monitors would cause an ugly message to be
logged. While this wasn't terminal, it wasn't a great experience. In
addition, the possibility of multiple DefaultConnectionContexts is a valid one
as you might need to connect to multiple host/port endpoints. This change
updates the name of the MBeans to include endpoint to properly handle the
valid case of multiple DefaultConnectionContexts for multiple endpoints. It
also warns about multiple duplicate DefaultConnectionContexts for the same
endpoint and removes the previous MBean, replacing it with the new one. It
also unregisters the MBean during disposal as part of normal cleanup.
[resolves #836]1 parent d46c067 commit 147e0f2
File tree
2 files changed
+42
-3
lines changed- cloudfoundry-client-reactor/src
- main/java/org/cloudfoundry/reactor
- test/java/org/cloudfoundry/reactor
2 files changed
+42
-3
lines changedLines changed: 25 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
| |||
146 | 159 | | |
147 | 160 | | |
148 | 161 | | |
149 | | - | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
222 | 234 | | |
223 | 235 | | |
224 | 236 | | |
225 | | - | |
226 | | - | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
227 | 245 | | |
228 | 246 | | |
229 | 247 | | |
230 | 248 | | |
231 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
232 | 254 | | |
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
71 | 88 | | |
0 commit comments