I'm currently analyzing JBoss Remoting, because I want to use it in a customer project here in Germany.
Particularly interesting are the TransporterClient and TransporterServer classes. During my first tests I noticed, that it is not possible to use remote classes which have methods that define interfaces as parameter types. I can only use methods that define concrete classes.
The problem seems to reside in the TranporterClient class. The "NameBasedInvocation" object, which is created in the "invoke()" method uses a String array, which contains the names of the object types that were passed to the method, but the parameter signature should IMHO contain the names of the types defined in the remote class.
So I changed the "createParamSignature()" method as follows:
private String[] createParamSignature(Class[] args) { if (args == null || args.length == 0) { return new String[] {}; } String[] paramSig = new String[args.length]; for (int x = 0; x < args.length; x++) { paramSig[x] = args[x].getName(); } return paramSig; }
String[] paramSig = createParamSignature(method.getParameterTypes());
Good catch. Have fixed this and will be in JBossRemoting 1.4.0 final (see http://jira.jboss.com/jira/browse/JBREM-251 for details).