是否可以 query/browse WebSphere Liberty 中的 JNDI 树?
Is it possible to query/browse the JNDI tree in WebSphere Liberty?
我有一个带有远程接口的 EJB,我想从客户端访问它。我很难为 JNDI 查找构建字符串。是否有一个命令行工具可以显示命名服务中的所有注册企业 bean?或者我可以在日志文件中看到这个吗?
JNDI 名称应如下所示:
corbaname:localhost:2809#ejb/global/MyApp/MyModule/EJBName!full.package.remote.interface.Name
我也不确定字符串中我的应用程序和模块名称是否正确。
据我所知,无法在 WebSphere Liberty 上转储 JNDI 命名空间 (there is a way to do this in WebSphere traditional)。
检查您的 EJB 注册的 JNDI 名称的最简单方法是检查 messages.log 文件。在 messages.log 文件中,您应该会看到一些 CNTR0167I
消息,这些消息指示服务器在何处绑定了您的 EJB。 messages.log 文件可以在 ${server.config.dir}/logs/messages.log
中找到。
示例 EJB 绑定消息:
CNTR0167I: The server is binding the com.example.DatabaseBean interface of the DatabaseBean enterprise bean in the TestProject.war module of the TestProject application. The binding location is: java:global/TestProject/DatabaseBean!com.example.DatabaseBean
有关详细信息,请查看 IBM 文档:
Using enterprise JavaBeans with remote interfaces on Liberty
我有一个带有远程接口的 EJB,我想从客户端访问它。我很难为 JNDI 查找构建字符串。是否有一个命令行工具可以显示命名服务中的所有注册企业 bean?或者我可以在日志文件中看到这个吗?
JNDI 名称应如下所示:
corbaname:localhost:2809#ejb/global/MyApp/MyModule/EJBName!full.package.remote.interface.Name
我也不确定字符串中我的应用程序和模块名称是否正确。
据我所知,无法在 WebSphere Liberty 上转储 JNDI 命名空间 (there is a way to do this in WebSphere traditional)。
检查您的 EJB 注册的 JNDI 名称的最简单方法是检查 messages.log 文件。在 messages.log 文件中,您应该会看到一些 CNTR0167I
消息,这些消息指示服务器在何处绑定了您的 EJB。 messages.log 文件可以在 ${server.config.dir}/logs/messages.log
中找到。
示例 EJB 绑定消息:
CNTR0167I: The server is binding the com.example.DatabaseBean interface of the DatabaseBean enterprise bean in the TestProject.war module of the TestProject application. The binding location is: java:global/TestProject/DatabaseBean!com.example.DatabaseBean
有关详细信息,请查看 IBM 文档:
Using enterprise JavaBeans with remote interfaces on Liberty