[
https://issues.jboss.org/browse/REMJMX-91?page=com.atlassian.jira.plugin....
]
Darran Lofthouse commented on REMJMX-91:
----------------------------------------
The reason the handback was sent was consistency with the following method: -
{code}
void addNotificationListener(ObjectName name,
ObjectName listener,
NotificationFilter filter,
Object handback)
throws InstanceNotFoundException,
IOException
{code}
i.e. this method does need the handback sent to the server as it needs to be passed to
another MBean.
But in the case identified here the NotificationListener is not sent to the server so we
can also optimise and avoid sending the handle, should be a fairly trivial change without
breaking backwards compatibility to stop sending the handle.
Note: Although this issue is addressing an error experienced on the server it is actually
only the client side that needs the fix.
AddNotificationListener is serializing the handback object to the
server -- causing ClassNotFoundExceptions.
------------------------------------------------------------------------------------------------------------
Key: REMJMX-91
URL:
https://issues.jboss.org/browse/REMJMX-91
Project: Remoting JMX
Issue Type: Bug
Components: Notifications
Affects Versions: 2.0.1.CR1
Reporter: Bryan Varner
Assignee: Darran Lofthouse
Fix For: 2.0.1.CR2
I have a client using a handback object when events are received from remote JMX
servers.
The handback is a local object instance used in the client, and should be operated on as
part of handling specific types of notifications. Rather than scoping this thing in my
code all over the place, it was much easier to include it as a handback.
This works _perfectly_ with the Oracle RMI client. When I try to use this code against
JBoss remoting servers, I get (burried) ClassNotFound Exceptions referencing the name of
my class.
It appears that ClientConnection is sending serialized copies of the handback object to
the server when a notificationListener is added... but why?
https://github.com/jbossas/remoting-jmx/blob/master/src/main/java/org/jbo...
Shouldn't the handback be local to the client?
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)