NameContext中的死锁。列表()

时间:2015-01-22 17:42:24

标签: java tomcat corba jacorb

我正在调用Tomcat容器中的代码并使用JacORB作为ORB提供程序:

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

当我将代码作为独立的Java应用程序运行时,我得到输出但是当我从Tomcat容器运行类似的代码时,线程在list()函数中陷入死锁

在服务器端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)

在客户端:

[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)

我没有得到的是为什么列表调用还没有结束,因为当我运行代码时,服务器端日志结束如

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

使用与tomcat集成的JacORB 2.3.1有什么问题吗?我可以从日志中假设ClientGIOPConnection无法回写TCP / IP传输流。

1 个答案:

答案 0 :(得分:0)

JacORB 2.3.1相当陈旧 - 你能试试3.5吗?

如果您可以提供测试用例(在jacorb bugzilla /邮件列表上:http://www.jacorb.org/support.html),那么我可以看看。