简体   繁体   English

NameContext中的死锁。 清单()

[英]Deadlock in NameContext. list ()

I'm calling following code from Tomcat container and using JacORB as ORB provider: 我正在从Tomcat容器调用以下代码,并将JacORB用作ORB提供程序:

 NamingContext ctx = NamingContextHelper.narrow(nameServiceObject);
            BindingListHolder blh = new BindingListHolder();
            BindingIteratorHolder bih = new BindingIteratorHolder();
            ctx.list(100, blh, bih);

When I run above code as stand alone Java application I get the output But when I run similar code from Tomcat container the thread stucks in deadlock at list() function 当我将上述代码作为独立的Java应用程序运行时,会得到输出,但是当我从Tomcat容器运行类似的代码时,线程在list()函数处陷入死锁

On Server Side JacORB logs: 在服务器端JacORB日志上:

2015-01-22 22:58:11.938 FINE POA NameServer-POA rid: 6 opname: list _invoke: queuing request
2015-01-22 22:58:11.938 FINE rid: 6 opname: list is queued (queue size: 1)
2015-01-22 22:58:11.938 FINE rid: 6 opname: list trying to get a RequestProcessor
2015-01-22 22:58:11.938 FINE rid: 6 opname: list starts with request processing
2015-01-22 22:58:11.938 FINE rid: 6 opname: list invokeOperation on servant (stream based)
2015-01-22 22:58:11.938 FINE wrote 76 bytes to 192.168.73.107:3176
2015-01-22 22:58:11.938 FINE wrote GIOP message of size 76 to ClientGIOPConnection to 192.168.73.107:3176 (af993e)
2015-01-22 22:58:11.938 FINE waiting for queue
2015-01-22 22:58:11.938 FINE read 12 bytes from 192.168.73.107:3176
2015-01-22 22:58:11.953 FINE read 13 bytes from 192.168.73.107:3176
2015-01-22 22:58:11.953 FINE read GIOP message of size 25 from ClientGIOPConnection to 192.168.73.107:3176 (af993e)
2015-01-22 22:58:11.953 FINE wrote 76 bytes to 192.168.73.107:3172
2015-01-22 22:58:11.953 FINE wrote GIOP message of size 76 to ClientGIOPConnection to 192.168.73.107:3172 (2c1e6b)
2015-01-22 22:58:11.953 FINE read 12 bytes from 192.168.73.107:3172
2015-01-22 22:58:11.953 FINE read 13 bytes from 192.168.73.107:3172
2015-01-22 22:58:11.953 FINE read GIOP message of size 25 from ClientGIOPConnection to 192.168.73.107:3172 (2c1e6b)
2015-01-22 22:58:11.953 INFO ClientConnectionManager: created new ClientGIOPConnection to 192.168.102.14:62245 (2200d5)
2015-01-22 22:58:11.953 FINE [0/3] removed idle thread (job scheduled)
2015-01-22 22:58:11.953 FINE ClientGIOPConnection to 192.168.102.14:62245 (2200d5): will wait until connected
2015-01-22 22:58:11.953 FINE findPOA: impl_name mismatch - 6839799491 != StandardNS
2015-01-22 22:58:11.953 FINE No CodeSetComponentInfo in IOR. Will use default CodeSets
2015-01-22 22:58:11.953 FINE ClientGIOPConnection to 192.168.102.14:62245 (2200d5): sendMessage() -- opening transport
2015-01-22 22:58:11.953 FINE Trying to connect to 192.168.102.14:62245 with timeout=90000.
2015-01-22 22:58:11.969 INFO Connected to 192.168.102.14:62245 from local port 3242
2015-01-22 22:58:11.969 FINE wrote 72 bytes to 192.168.102.14:62245
2015-01-22 22:58:11.969 FINE wrote 24 bytes to 192.168.102.14:62245
2015-01-22 22:58:11.969 FINE wrote GIOP message of size 80 to ClientGIOPConnection to 192.168.102.14:62245 (2200d5)

While on Client side: 在客户端时:

[jacorb.orb.iiop] INFO : Opened new server-side TCP/IP transport to 192.168.73.107:3242
[jacorb.orb.giop.conn] DEBUG : GIOPConnectionManager: created new ServerGIOPConnection to 192.168.73.107:3242 (f7345b)
[jacorb.util.tpool] DEBUG : [0/0] creating new thread
[jacorb.util.tpool] DEBUG : [0/1] removed idle thread (job scheduled)
[jacorb.giop.server.l] DEBUG : Received CodeSetContext. Using ISO8859_1 as TCS and UTF16 as TCSW
[jacorb.poa] DEBUG : POA RootPOA rid: 0 opname: _non_existent _invoke: queuing request
[jacorb.poa.queue] DEBUG : rid: 0 opname: _non_existent is queued (queue size: 1)

What I m not getting is why list call has not ended because When I run the code stand alone Server side logs ends like 我不明白的是为什么列表调用还没有结束,因为当我独立运行代码时,服务器端日志会像

2015-01-22 19:56:23.399 INFO Connected to 192.168.102.14:61988 from local port 3031
2015-01-22 19:56:23.399 FINE wrote 72 bytes to 192.168.102.14:61988
2015-01-22 19:56:23.399 FINE wrote 24 bytes to 192.168.102.14:61988
2015-01-22 19:56:23.399 FINE wrote GIOP message of size 80 to ClientGIOPConnection to 192.168.102.14:61988 (1d5a0)
2015-01-22 19:56:23.414 FINE read 12 bytes from 192.168.102.14:61988
2015-01-22 19:56:23.414 FINE read 13 bytes from 192.168.102.14:61988
2015-01-22 19:56:23.414 FINE read GIOP message of size 25 from ClientGIOPConnection to 192.168.102.14:61988 (1d5a0)
2015-01-22 19:56:23.430 FINE ServerRequest: reply to list

Is ther any problem using JacORB 2.3.1 integrated with tomcat ? 将JacORB 2.3.1与tomcat集成是否有任何问题? As what I can assume from logs is ClientGIOPConnection is not able to write back on TCP/IP transport Stream. 我可以从日志中假设ClientGIOPConnection无法在TCP / IP传输流上写回。

JacORB 2.3.1 is rather old - could you try 3.5 ? JacORB 2.3.1较旧-您可以尝试3.5吗?

If you can provide a test case ( on the jacorb bugzilla / mailing lists : http://www.jacorb.org/support.html ) then I can take a look. 如果您可以提供测试用例(在jacorb bugzilla /邮件列表上: http : //www.jacorb.org/support.html ),那么我可以看一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM