简体   繁体   English

远程客户端上的EJB

[英]EJB on a remote client

I have successfully compiled, deployed, and tested a simple, Remote, Stateless Session Beans on my local machine using this tutorial . 使用该教程 ,我已经在本地计算机上成功地编译,部署和测试了一个简单的,远程,无状态会话Bean。

The program just prints out "Hello World" in NetBeans output window when run. 该程序在运行时仅在NetBeans输出窗口中打印出“ Hello World”。

However I wish to run the client application on another home machine which doesn't has GlassFish or JavaEE installed. 但是我希望在没有安装GlassFish或JavaEE的另一台家用计算机上运行客户端应用程序。 I read here that, to do this I need to create a stand alone Java Application; 我在这里读到 ,要做到这一点,我需要创建一个独立的Java应用程序。 however I am unsure about the steps to take to obtain the same result. 但是我不确定要获得相同结果要采取的步骤。

I am new to EJB architecture. 我是EJB体系结构的新手。 Any help is greatly appreciated. 任何帮助是极大的赞赏。

It's simple. 这很简单。 On the first step create standalone application. 第一步,创建独立的应用程序。 For example in main method get remote instance of the bean through InitialContext (I suppose, that you define Stateless bean through Remote Interface). 例如,在main方法中,通过InitialContext获取bean的远程实例(我想,您是通过Remote Interface定义无状态bean的)。 Then you can work with bean. 然后,您可以使用bean。 Please, remember remote access through InitialContext is different on the different servers type (jboss,weblogic,glassfish). 请记住,在不同的服务器类型(jboss,weblogic,glassfish)上,通过InitialContext进行的远程访问是不同的。 In final look at link: InitialContext on jboss 最后看一下链接: jboss上的InitialContext

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

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