gpt4 book ai didi

java - glassfish:使用应用程序客户端容器远程调用 EJB 模块

转载 作者:行者123 更新时间:2023-12-01 12:30:55 26 4
gpt4 key购买 nike

fighting passwords之后在 Ubuntu 14.04 Tahr 上远程使用 Glassfish 4.x 时,我已准备好继续安装我的第一个远程 EJB 模块 —— 只是想确保我走在正确的道路上。从 Netbeans 示例开始 Creating and Running an Application Client on the GlassFish Server , 我如何为远程部署的 EJB 模块创建一个客户端?

Netbeans 示例假设 Glassfish 在本地主机上运行。我不清楚确切的机制,因为它没有为本地主机明确配置。据推测它是为本地主机隐式配置的...

我想使用 ACC 连接到本地,而不是远程 Glassfish 服务器。对于上下文,ACC 是:

Introducing the Application Client Container

The Application Client Container (ACC) includes a set of Java classes, libraries, and other files that are required for and distributed with Java client programs that execute in their own Java Virtual Machine (JVM). The ACC manages the execution of Java EE application client components (application clients), which are used to access a variety of Java EE services (such as JMS resources, EJB components, web services, security, and so on.) from a JVM outside the Oracle GlassFish Server. The ACC communicates with the GlassFish Server using RMI-IIOP protocol and manages the details of RMI-IIOP communication using the client ORB that is bundled with it. Compared to other Java EE containers, the ACC is lightweight. For information about debugging application clients, see Application Client Debugging.

GlassFish Server 开源版应用程序开发指南 4.0 版

另请参阅:

https://stackoverflow.com/questions/25830149/how-to-package-a-stand-alone-remote-ejb-application-client

客户端应用程序中,ACC 如何远程调用 EJB 模块?

必须有一个配置。 ACC 是否从 jndi.properties 中获取此信息?我找不到太多关于 ACC 使用的文档或示例。如果ACC不适合,那么,当然,我会使用不同的方法。大概有一种方法可以为 ACC 指定远程 Glassfish 服务器。

最佳答案

您打算如何部署您的应用程序?

在我为 ACC 开发应用程序客户端的日子里,我曾经将所有内容捆绑在 EAR 中(我仍然会这样做,因为它更容易)。

Glassfish 部署工件,生成所需的配置(无论如何,您都可以覆盖 application.xml 中的配置)。

ACC 关心的一件事是远程连接所需的 CORBA 属性。

当您从 glassfish 管理员下载客户端 jar 时,您会下载一个 java webstart 应用程序,该应用程序会根据需要下载所有必需的库,并自动从哪个主机设置配置(最重要的是您正确设置 glassfish 域主机,否则这将导致是内部 IP 或本地主机),它是从其下载的。

关于java - glassfish:使用应用程序客户端容器远程调用 EJB 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25927430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com