Use of serialization in JMX calls on Websphere Appserver to avoid ClasscastException
Posted
by hstoerr
on Stack Overflow
See other posts from Stack Overflow
or by hstoerr
Published on 2010-04-01T10:40:49Z
Indexed on
2010/04/01
10:43 UTC
Read the original article
Hit count: 425
We are using JMX for communication between different EARs on the same Websphere application server (6.1). All works well if we only use Java types as arguments, but if we use or own the problem is that we get ClassCastExceptions on the receiver side. This is obviously a classloader problem: if the jar with the argument types is put into the JRE endorsed directory, such that all classloaders use exactly the same class, the Exception disappear. But we would much prefer to put the library that defines the argument types in the EAR itself.
Now my question: is there a trick to persuade WAS to serialize and deserialize the arguments during the JMX call? I guess in this case the ClassCastException would dissappear.
© Stack Overflow or respective owner