简体   繁体   English

确定远程 EJB 调用失败的原因

[英]Determining cause for failed remote EJB invocation

I recently successfully migrated j-lawyer.org from JBoss 6 to Wildfly 9.0.2 and have the following question:我最近成功地将 j-lawyer.org 从 JBoss 6 迁移到 Wildfly 9.0.2 并有以下问题:

I am using a Swing application that accesses remote EJBs (with security enabled).我正在使用访问远程 EJB(启用安全性)的 Swing 应用程序。 When launching the application, the user has an option to specify server and port as well as provide credentials.启动应用程序时,用户可以选择指定服务器和端口以及提供凭据。

Question : How to distinguish between connection issues (wrong server or port) and authentication issues (wrong credentials)?问题:如何区分连接问题(错误的服务器或端口)和身份验证问题(错误的凭据)?

In case of any failure, all I am getting is万一失败,我得到的只是

java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver
available for handling [appName:j-lawyer-server, moduleName:j-lawyer
server-ejb, distinctName:] combination for invocation context
org.jboss.ejb.client.EJBClientInvocationContext@10a4ea27

I do NOT have any issue with EJB remote invocations in general - everything is working fine.一般而言,我对 EJB 远程调用没有任何问题 - 一切正常。

Just to provide meaningful error messages to the end user, I would like to find out the root cause for the failed connection.只是为了向最终用户提供有意义的错误消息,我想找出连接失败的根本原因。 #getCause doesn't help (is IllegalStateException again), and parsing the stacktrace might not be stable and "break" with the next Wildfly release. #getCause 没有帮助(再次是 IllegalStateException),并且解析堆栈跟踪可能不稳定,并且在下一个 Wildfly 版本中“中断”。 With JBoss 6, there were eg EJBAccessExceptions when credentials were wrong, so you could figure out what went wrong.在 JBoss 6 中,当凭据错误时会出现 EJBAccessExceptions,因此您可以找出问题所在。

Any ideas?有任何想法吗?

Thanks, Jens谢谢,詹斯

have you updated the client code accordingly, in order to make sure, JNDI entries and stub code, is compatible with your new server?您是否相应地更新了客户端代码,以确保 JNDI 条目和存根代码与您的新服务器兼容? See some related questions and check the specific code.看一些相关问题,查看具体代码。 Here , or here and last but not least check the official Jboss (Wildfly) page in the remote EJB invocation here , there is also a wildfly specific API you could use. 在这里,或者在这里,最后但并非最不重要的检查远程 EJB 调用中的官方 Jboss ( Wildfly ) 页面,还有一个可以使用的特定于 Wildfly 的 API。

Hope that helps!希望有帮助!

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

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