java - NameContext 中的死锁。列表 ()

标签 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 传输流上写回。

最佳答案

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

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

关于java - NameContext 中的死锁。列表 (),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28095279/

相关文章:

java - 在所有其他用户线程完成后,守护线程生成的用户线程是否继续存在?

java - 使用外部方法设置对象是否有意义?用这个?

Tomcat,启用DELETE方法

c++ - 无需重新编译即可更改 CORBA 接口(interface)

c++ - ACE/TAO 性能问题

java - CORBA 命名服务上存储对象/引用的限制

java - 跨域认证

java - Tomcat(8.0.32) lib 目录中的 HikariCP(2.4.6) 不记录

java - 无法加载 xsl 文件

java - 将 XML 从 JSF textarea 传递到 Bean