ARTEMIS-565 Dealing with ClassLoading issues on managements. Caching …#684
ARTEMIS-565 Dealing with ClassLoading issues on managements. Caching …#684asfgit merged 2 commits intoapache:masterfrom
Conversation
|
What was happening prior to this change? |
|
If you build and run message-count example without this fix you will see a class not found exception. Management is using RMI and I have no control over the class loader. I would need to either do this is wrap every messaging call with setting the Tccl. This is the best solution I could find. But I'm open to anything else. |
|
If you don't mind, let me take a look over the weekend. This sounds like more of an issue with the geronimo spec jar, which we can get changes into. |
|
i thought about changing JsonProvider to cache the loaded so this wouldn't be an issue (I could load it under the right class loader once) |
|
Will wait for you then. |
|
Mmmph. So I can fix the spec jar for geronimo, but the problem will persist in the other spec jars, e.g. the same problem happens w/ the RI JAR and the JBoss JAR. Minor issue, I would do this as the loader method, to avoid casting |
|
@johnament I wouldn't need this whole thing if this was merged. Just sent the PR: I"m not sure about the reasoning for loading the class every time. It seems silly to me... so I guess this PR should be an improvement. You know that project better than I do. |
|
At this point, this is the best solution to ensure that it works across different impls and spec jars. +1 |
…provider loaded