Article View: comp.lang.java.corba
Article #3multiple CORBA connections
From: 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.
Technical Details
Message-ID:
<3937FCD1.C0867696@telcordia.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f753e,59c0133dfedcf84d,start X-Google-Attributes: gidf753e,public X-Google-Thread: 108bbb,59c0133dfedcf84d,start X-Google-Attributes: gid108bbb,public X-Google-Thread: fed8b,59c0133dfedcf84d,start X-Google-Attributes: gidfed8b,public X-Google-Thread: 10b07f,59c0133dfedcf84d,start X-Google-Attributes: gid10b07f,public From: Oleg Konovalov <okonoval@telcordia.com> Subject: multiple CORBA connections Date: 2000/06/02 Message-ID: <3937FCD1.C0867696@telcordia.com> X-Deja-AN: 630313717 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Trace: 2 Jun 2000 14:28:28 -0500, 128.96.172.43 MIME-Version: 1.0 Newsgroups: comp.lang.java.corba,comp.object.corba,borland.public.jbuilder.corba-rmi,comp.lang.idl