简体   繁体   English

使用主机名和端口名调用在Weblogic实例上运行的远程EJB

[英]Calling a Remote EJB running on a Weblogic instance using Host & Port name

I have a question about calling a Remote EJB (3.0) running on a Weblogic instance using Host & Port name of the Weblogic Server. 我有一个问题,有关使用Weblogic Server的主机和端口名称调用在Weblogic实例上运行的远程EJB(3.0)。

I've read the Java EE 6 tutorial specifically about invoking a remote EJB either through JNDI or through Dependency Injection. 我已经阅读了有关专门通过JNDI或通过依赖注入来调用远程EJB的Java EE 6教程

But the environment (Common Dev environment) I work with has client code that accesses the EJB through a host name and a port name using Spring. 但是我使用的环境(Common Dev环境)具有使用Spring通过主机名和端口名访问EJB的客户端代码。

I have a local instance of Weblogic and deployed the ear file. 我有一个Weblogic的本地实例,并部署了ear文件。 I wanted to follow the same workflow (using the host name and the portname) to call this ejb on my local machine (the client will be running on another application server locally) to see if remote attachment to my ejb works. 我想遵循相同的工作流程(使用主机名和端口名)在本地计算机上调用此ejb(客户端将在本地的另一台应用程序服务器上运行),以查看对我的ejb的远程附件是否有效。 But I'm not sure what the deal is with the port number. 但是我不确定端口号是怎么回事。 What am I missing? 我想念什么?

I believe, as far as the calling client is concerned, it's accessing the Remote EJB's via RMI via JNDI. 我相信,就调用客户端而言,它正在通过RN通过JNDI访问Remote EJB。 It shouldn't be all that different. 它不应该那么不同。

Spring does have some native support for accessing the remote EJBs Spring确实具有访问远程EJB的一些本机支持。

http://docs.spring.io/spring/docs/4.0.0.RELEASE/spring-framework-reference/htmlsingle/#ejb-access http://docs.spring.io/spring/docs/4.0.0.RELEASE/spring-framework-reference/htmlsingle/#ejb-access

Typically, when you have the host/port of the remote server, that's part of the InitialContext object created for the JNDI Context. 通常,当您拥有远程服务器的主机/端口时,这就是为JNDI Context创建的InitialContext对象的一部分。 It also looks like there is some Spring components that look after this mapping: in the context.xml, there is jee:local-slsb. 看起来也有一些Spring组件负责此映射:在context.xml中,有jee:local-slsb。 I don't know if there is an equivalent for annotations. 我不知道注解是否等效。

I haven't done any of this myself, but the documentation is probably a good start. 我自己还没有做任何事情,但是文档可能是一个好的开始。

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

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