jndi聚类

发布于 2024-11-10 07:03:10 字数 431 浏览 8 评论 0原文

我有一些关于 JNDi 和 clustring 的问题:

  1. 当部署 EJB 时,它会自动在 JNDI 中“注册”吗?

  2. 我读到,为了访问 WebSphere 的集群 EJB,我需要查找类似以下内容:“cell/cluster//ejb/... - “cell”概念是 Websphere 概念还是 J2EE 概念?

  3. 我有一个奇怪的需求 - 我想要集群,但不一定使用 WebSphere - 也就是说,我有一个 WebSphere 集群:由服务器 A 和 B 组成的 C,而且我还有另一个部署了不同应用程序的 websphere 服务器 D A 和 B,但具有相同的 SessionBean 接口、相同的 API。我希望能够创建对 EJB 的负载平衡/集群调用,并让它在 A 上执行一次,在 B 上执行一次,在 D 上执行一次。

I have a few questions about JNDi and clustring:

  1. When an EJB is deployed is it automatically "registered" in the JNDI?

  2. I read that for acessing a clustered EJB of WebSphere I need to lookup something like: "cell/cluster//ejb/... - is the "cell" concept a Websphere concept or a J2EE concept?

  3. I have a weird demand - I want to cluster, but not neccesarily using WebSphere - That is, I have a WebSphere cluster: C consisitng of servers A and B, and also I have another websphere server D with different application deployed than A and B, but with the same SessionBean interface, same API. I want to be able to create a load-balanced/clustered call to the EJB and let it once execute on A, once on B and once on D.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

生生不灭 2024-11-17 07:03:10
  1. 不是。但这取决于 EJB 的部署描述符/注释。
  2. 这是来自 WebSphere (http://itdevworld.wordpress.com/2009/05/03/websphere-concepts-cell-node-cluster-server/) 的术语。
  3. 据我所知,如果您将 EJB 部署到集群,它会自动进行负载平衡。
  1. No. But it depends on deployment descriptor/annotations of EJB.
  2. It's a term from WebSphere (http://itdevworld.wordpress.com/2009/05/03/websphere-concepts-cell-node-cluster-server/).
  3. As far as I know if you deploy your EJB to the cluster it is automatically load-balanced.
猫腻 2024-11-17 07:03:10
  1. 是的,EJB 在部署后始终可通过 JNDI 进行查找。这是 EJB 规范强制要求的。插入的名称是标准化的。请参阅 wikipedia 上的 EJB 命名和目录服务
  2. “cell”是Websphere 特有的。尽管 Java EE 规范(特别是 EJB 规范)确实假设存在集群,并设置了一些限制以使集群更容易,但令人惊讶的是,定义明确处理集群的 API 和命名标准却很少(JCA 1.6 是少数几个支持集群的 API 和命名标准之一)。我想到了)。
  3. 这确实听起来很奇怪。如果我理解正确的话,总共只允许 3 个调用(1 个到 A、1 个到 B 和 1 个到 D),然后所有服务都应该停止?也许你不应该想要这样的东西;)
  1. Yes, an EJB is always made available for lookup via JNDI after it's deployed. This is mandated by the EJB spec. The name under which it is inserted is standardized. See EJB-Naming and directory services on wikipedia.
  2. "cell" is Websphere specific. Although the Java EE spec in general and specifically the EJB spec do assume clustering exists and put several limitations in place to make clustering easier, there are surprisingly little APIs and naming standards defined that deal explicitly with clustering (JCA 1.6 is one of the few that comes to mind).
  3. This indeed sounds weird. If I understand correctly, only 3 calls in total are allowed (1 to A, 1 to B and 1 to D) and then all service should stop? Maybe you should not want something like this ;)
半衾梦 2024-11-17 07:03:10
  1. 注册实际上是在 EJB 应用程序启动时完成的。它使用DD信息向WAS JNDI服务器注册

  2. 您所指的是完全限定的 JNDI 名称。您应该尝试不使用它,而只使用本地 JNDI 名称。为什么?完全限定名称具有拓扑特定信息,您不会在应用程序中使用这些信息,因为开发、测试和生产环境之间的拓扑会有所不同。本地名称空间的整个想法是隐藏各个供应商存储的方式,并使应用程序不依赖于供应商实现

  3. WAS 中的集群工作的前提是相同的应用程序部署到所有供应商属于 hte 集群一部分的服务器。事实上,如果服务器是集群的一部分,则无法将应用程序部署到该服务器。它只能部署到集群级别,并且 WAS 基础设施将相同的应用程序部署到所有集群成员。

循环是一种可以在服务器上配置的 WLM 策略。另一个选项是为每个集群成员赋予权重。

HTH

曼格鲁

  1. The registration is actually done when the EJB application is started up. It uses the DD information to register with the WAS JNDI Server

  2. What you are referring to is referred to as the fully qualified JNDI Name. You should try and not use that and simply work with local JNDI names. Why? The fully qualified name has the topology specific information and you would not be using these in your application as the topologies would be different between development, test and prod environments. The whole idea of local name spaces was to hide the way the various vendors store and have the application not have any dependency on the vendor implementation(s)

  3. Clustering in WAS works iwth the premise that the same application is deployed to all the servers that are part of hte cluster. In fact, if a server is part of a cluster, you cannot deploy an application to that server. It can only be deployed to the cluster level and the WAS infrastructure deploys the same application to all the cluster members.

Round-robin is a WLM policy which can be configured on the server. The other option is having weightage for each cluster member.

HTH

Manglu

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文