Re: Re: 回复:_Re:_[OB-Users]_a_question_about_how_to_use_a_common_connection_in Orbacus
"翟明玉" <[email protected]> Thu, 26 Oct 2006 17:40:11 +0800
| Newsgroups | gmane.comp.corba.orbacus |
|---|---|
| Message-ID | <[email protected]> |
Stan Lewis,
In ooc.conf, if ooc.orb.conc_model is setted to threaded, ooc.orb.cli=
ent_timeout=3D2 works well.
The following is the result:
----------------------
******************Before string_to_object()... =09
Before narrow()...
[ outgoing: trying to establish connection
timeout: 3000ms
id: iiop
remote address: 192.1.101.205:32323 ]
[ outgoing: new connection
id: iiop
local address: 192.1.101.205:36612
remote address: 192.1.101.205:32323 ]
[ outgoing: closing connection
id: iiop
local address: 192.1.101.205:36612
remote address: 192.1.101.205:32323 ]
[ outgoing: trying to establish connection
timeout: 3000ms
id: iiop
remote address: 192.1.101.205:32323 ]
[ outgoing: new connection
id: iiop
local address: 192.1.101.205:36613
remote address: 192.1.101.205:32323 ]
before say_hello(), sleep 10...
[ outgoing: trying to establish connection
timeout: 3000ms
id: iiop
remote address: 192.1.101.205:32323 ]
[ outgoing: new connection
id: iiop
local address: 192.1.101.205:36614
remote address: 192.1.101.205:32323 ]
before say_hello() 1, sleep 10...
After say_hello()...
[ outgoing: closing connection
id: iiop
local address: 192.1.101.205:36614
remote address: 192.1.101.205:32323 ]
[ outgoing: closing connection
id: iiop
local address: 192.1.101.205:36613
remote address: 192.1.101.205:32323 ]
******************Before string_to_object()...
Before narrow()...
-----------------
from the above, we can see the first connection(192.1.101.205:36613 t=
o 192.1.101.205:32323) was closed at the end of run() procedure, but we h=
ope it should be closed before the output "before say_hello(), sleep 10.=
..", because here it sleeps 5 seconds. why is the second connection(192.1=
.101.205:36614 to 192.1.101.205:32323) not closed before the output "befo=
re say_hello() 1, sleep 10...", here it also sleeps 5 seconds? A now co=
nnection should be open for the second say_hello() call. What is the dif=
fence between threaded and reactive client?
regards
=09
=3D=3D=3D=3D=3D=3D=3D 2006-10-23 21:38:17 =C4=FA=D4=DA=C0=B4=D0=C5=D6=D0=D0=
=B4=B5=C0=A3=BA=3D=3D=3D=3D=3D=3D=3D
>Hi Zhai,
>
>On Sunday 22 October 2006 05:07, Zhai wrote:
>> Hi,Stan
>> we want to know why the first
>> connection(192.1.101.205:33189 to
>> 192.1.101.202:11000) would not be closed before the
>> second connection is created, and when would the first
>> connection be closed, and how to close it? It seems it
>> should be closed after the second connection was
>> created.
>
>If you set the OB::CONNECTION_REUSE_POLICY_ID policy to false, the ORB w=
ill=20
>create multiple connections in parallel to the target object for each pr=
oxy=20
>that's created. You can close them by either explicitly calling:
>
>proxy_object->_OB_closeConnection(true);
>
>when you're done invoking or by setting a low idle timeout for client=20
>connections via the "ooc.orb.client_timeout" configuration variable (the=
idle=20
>time value is in seconds, 0 indicates no timeout).
>
>If you set the OB::CONNECTION_REUSE_POLICY_ID policy to true, the ORB wi=
ll=20
>only create one connection that's shared by all proxy instances. If you=
're=20
>making invocations via multiple threads I'd recommend that you not expli=
citly=20
>close the connection, as you could possibly close the connection from on=
e=20
>thread while another thread is in the process of making an invocation. =20
>However, you can still use the "ooc.orb.client_timeout" configuration=20
>variable to control when the client closes it's connection to the server=
, as=20
>it would be closed when all threads are done making invocation for some =
idle=20
>period.
>
>Regards,
>
>Stan
>--=20
>Stan Lewis =20
>Team Orbacus - Your CORBA Source
>E-Mail: [email protected]
>WWW: http://www.orbacus.com
=3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D=
=3D
=09
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=D6=C2
=C0=F1=A3=A1
=20
=20
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=B5=D4=C3=F7=D3=F1
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1myzhai@yahoo.com.cn
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A12006-10-26
_______________________________________________
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