Thread View: comp.lang.java.corba
2 messages
2 total messages
Started by Oleg Konovalov
Fri, 02 Jun 2000 00:00
multiple CORBA connections
Author: Oleg Konovalov
Date: Fri, 02 Jun 2000 00:00
Date: Fri, 02 Jun 2000 00:00
52 lines
1920 bytes
1920 bytes
Hi,
I am implementing Notification applet (using JFC), which is polling 2
servers and retrieves info from them [once a minute].
Have a few questions to you in this regard:
1) Can one client bind and sustain connections to 2 servers at once ?
2) If so, how would it distinguish which server to send a request/get
response from,
another words would the following Java code snippet work in principal?
class ServerInterface extends Object {
ServerInterface(String ip){...};
bindToServer(String ip) {...}
String[] getMsgs() {...}
disconnect () {...}
}
class MyForm extends JFrame {
String ip1, ip2;
String[] buf1, buf2;
serverInterface sI1 = new serverInterface(ip1);
serverInterface sI2 = new serverInterface(ip2);
...
myMethod {
while (true) {
buf1=sI1.getMsgs();
buf2=sI2.getMsgs()
sleep(1min);
}
}
finalize() {
sI1.disconnect();
sI2.disconnect();
}
}
3) Would you recommend putting sI1.getMsgs() and sI2.getMsgs()
in separate threads ?
4) Any references on the topic ?
Thank you in advance,
Oleg.
Re: multiple CORBA connections
Author: Martin v.Loewis
Date: Fri, 02 Jun 2000 00:00
Date: Fri, 02 Jun 2000 00:00
28 lines
1902 bytes
1902 bytes
In article <3937FCD1.C0867696@telcordia.com>,
Oleg Konovalov <okonoval@telcordia.com> wrote:
>1) Can one client bind and sustain connections to 2 servers at once ?
Definitely.
>2) If so, how would it distinguish which server to send a request/get
>response from,
>another words would the following Java code snippet work in principal?
>
>class ServerInterface extends Object {
> ServerInterface(String ip){...};
> bindToServer(String ip) {...}
> String[] getMsgs() {...}
> disconnect () {...}
>}
Primarily, because the Java language mapping does not work this way.
Please read some book on the Java language mapping (or any other book
on CORBA) for information about the concept of "stub" objects.
>4) Any references on the topic ?
The "standard" reference on CORBA design currently seems to be the book
by Michi Henning and Steve Vinoski.
Regards,
Martin
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads