Re: a question about how to use a common connection in Orbacus
Stan Lewis <[email protected]> Sat, 21 Oct 2006 09:19:28 -0400
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Organization | IONA Technologies |
| Message-ID | <[email protected]> |
Hi Zhai, On Friday 20 October 2006 23:28, =B5=D4=C3=F7=D3=F1 wrote: > Stan Lewis, > we test the policy "OB::CONNECTION_REUSE_POLICY_ID" in our program(= i.e. > set the OB::CONNECTION_REUSE_POLICY_ID to false), but we got the follow= ing: > > **************************init > orb:rtdbms************************************ *************iiop > hostname:port,we use persistent POA************** > > [ outgoing: trying to establish connection > timeout: 3000ms > id: iiop > remote address: 192.1.101.202:11000 ] > [ outgoing: new connection > id: iiop > local address: 192.1.101.205:33188 > remote address: 192.1.101.202:11000 ] > [ outgoing: closing connection > id: iiop > local address: 192.1.101.205:33188 > remote address: 192.1.101.202:11000 ] > [ outgoing: trying to establish connection > timeout: 3000ms > id: iiop > remote address: 192.1.101.202:11000 ] > [ outgoing: new connection > id: iiop > local address: 192.1.101.205:33189 > remote address: 192.1.101.202:11000 ] > **********-->after narrow obj *********** > [ outgoing: trying to establish connection > timeout: 3000ms > id: iiop > remote address: 192.1.101.202:11000 ] > [ outgoing: new connection > id: iiop > local address: 192.1.101.205:33190 > remote address: 192.1.101.202:11000 ] > ********************************************* > > we can see from the above example, there are two > connections(192.1.101.205:33189 to 192.1.101.202:11000 and > 192.1.101.205:33190 to 192.1.101.202:11000),but if not setting the > OB::CONNECTION_REUSE_POLICY_ID to false, there is only one > connection(192.1.101.205:33189 to 192.1.101.202:11000). why produces > another connection after the _narrow() operation? thx. Right, the connection re-use policy controls whether or not a new proxy=20 instance will open it's own connection or re-use an existing connection. = =20 What I was pointing out is basically by default proxy instances for the s= ame=20 target object will share a single connection. However, you can use this=20 policy so that proxy instances for the same target object will each creat= e=20 their own connection. In some circumstances you may want this, as you ca= n=20 get a little better throughput since the ORB doesn't have to serialize ac= cess=20 to a single connection when multiple threads are sharing the same connect= ion. Regards, Stan --=20 Stan Lewis =20 Team Orbacus - Your CORBA Source E-Mail: [email protected] WWW: http://www.orbacus.com _______________________________________________ OB-Users Mailing List - [email protected] http://mail.ooc.nf.ca/mailman/listinfo/ob-users Visit our support FAQ before you send a message. http://www.orbacus.com/faq/support.html