activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nguyen Kien Trung <trung....@gmail.com>
Subject Same class but not equal ==
Date Tue, 01 Aug 2006 11:20:16 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I've got a mysterious error...<br>
<br>
I'm using Lingo and ActiveMQ for remote method invocation.<br>
<br>
When receiving a RemoteInvocation object, Lingo uses reflection to
invoke method on proxy object which has been created earlier. But the
invocation throws NoSuchMethodException. I logged as much as I could
and found out:<br>
<br>
1) By introspecting the proxy object, it's confirmed that it contains
the required method for invocation<br>
2) The parameters retrieved from RemoteInvocation object (invocation)
by getParameterTypes() and from the proxy object by introspection are
similar in terms of <b>class type</b><br>
3) Interesting results<br>
<tt>&nbsp;&nbsp;&nbsp; log.debug("equal==? : " + (m.getParameterTypes()[0]
==
invocation.getParameterTypes()[0])); <b>// return false</b><br>
&nbsp;&nbsp;&nbsp; log.debug("equal? : " +
(m.getParameterTypes()[0].equals(invocation.getParameterTypes()[0])));<b>//
return false</b><br>
&nbsp;&nbsp;&nbsp; log.debug("equal class loader ==? : " +
(m.getParameterTypes()[0].getClassLoader() ==&nbsp;
invocation.getParameterTypes()[0].getClassLoader())); <b>// return
false</b><br>
<br>
where:<br>
- m: of type java.lang.reflect.Method : method in the proxy object<br>
- invocation: of type
org.springframework.remoting.support.RemoteInvocation : invocation
object received from ActiveMQ<br>
<br>
<br>
</tt>So, the issue here is: "Same class but not equal"<br>
Is there anything in marshalling and demarshalling process of ActiveMQ
that could lead to this problem?<br>
<br>
Appreciate for any advice<br>
<br>
Trung<br>
</body>
</html>

Mime
View raw message