我正在从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


将JacORB 2.3.1与tomcat集成是否有任何问题?我可以从日志中假设ClientGIOPConnection无法在TCP / IP传输流上写回。

最佳答案

JacORB 2.3.1较旧-您可以尝试3.5吗?

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

10-07 13:54