Interface & Session problem [message #650188] |
Sat, 22 January 2011 11:57  |
Eclipse User |
|
|
|
Hello guys,
Im quite new about ECF and there is not many docs about that and i runed into some problems. First problem is about interfaces. I have two interfaces A and B extends A. Now i register remote service which implements B. When i call remote methods from interface B everything works fine but when i call anything from A i got NoSuchMethod exception. Anybody knows what is the problem? I use 'generic server and generic client' containers.
Second problem is harder (at least for me). I have server and client and i need client to login first to be able to use my service API. How i can make client identificable from server side when he call any remote methods? I dont wanna put any sessionId togather wtih my method call arguments. Is it possible to do some other, more nice way?
I will be glad for any help and suggestions.
|
|
|
|
|
Re: Interface & Session problem [message #650227 is a reply to message #650188] |
Sun, 23 January 2011 07:41   |
Eclipse User |
|
|
|
About interface problem ive downloaded source and i see its very strange for me. This is part of code responsible for that from file SharedObjectMsg.java :
public static Method findMethod(final Class clazz, String meth, Class args[]) {
try {
return ClassUtil.getDeclaredMethod(clazz, meth, args);
} catch (NoSuchMethodException e) {
return null;
}
}
It is called for search invoked method. As you see it gets only declared methods within Class. Thats why for my B interface methods from interface A are invisible. When ive changed to code like this:
public static Method findMethod(final Class clazz, String meth, Class args[]) {
try {
return ClassUtil.getDeclaredMethod(clazz, meth, args);
} catch (NoSuchMethodException e) {
try {
return ClassUtil.getMethod(clazz, meth, args);
} catch (NoSuchMethodException e1) {
return null;
}
}
}
it works fine. Anybody knows whats the reason they've made it such way? Or maybe its some bug?
|
|
|
|
|
Re: Interface & Session problem [message #650474 is a reply to message #650327] |
Tue, 25 January 2011 02:46  |
Eclipse User |
|
|
|
On 01/24/2011 01:23 PM, kith1985@o2.pl wrote:
> I moved already from 3.2 to 3.4 and the strange code i showed about is
> take exactly from 3.4 version. About method signature it really doesn't
> matter how look like cause i want call just method, lets say 'void
> test();' It doesn't work because of what i wrote above. The only
> question is why its done that way? Why they prevent me from calling that?
Hi,
please file a bug over at https://bugs.eclipse.org and attach a test
case or at least both interfaces causing this behavior.
Markus
|
|
|
Powered by
FUDForum. Page generated in 0.03641 seconds