jndi聚类
我有一些关于 JNDi 和 clustring 的问题:
当部署 EJB 时,它会自动在 JNDI 中“注册”吗?
我读到,为了访问 WebSphere 的集群 EJB,我需要查找类似以下内容:“cell/cluster//ejb/... - “cell”概念是 Websphere 概念还是 J2EE 概念?
我有一个奇怪的需求 - 我想要集群,但不一定使用 WebSphere - 也就是说,我有一个 WebSphere 集群:由服务器 A 和 B 组成的 C,而且我还有另一个部署了不同应用程序的 websphere 服务器 D A 和 B,但具有相同的 SessionBean 接口、相同的 API。我希望能够创建对 EJB 的负载平衡/集群调用,并让它在 A 上执行一次,在 B 上执行一次,在 D 上执行一次。
I have a few questions about JNDi and clustring:
When an EJB is deployed is it automatically "registered" in the JNDI?
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?
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
注册实际上是在 EJB 应用程序启动时完成的。它使用DD信息向WAS JNDI服务器注册
您所指的是完全限定的 JNDI 名称。您应该尝试不使用它,而只使用本地 JNDI 名称。为什么?完全限定名称具有拓扑特定信息,您不会在应用程序中使用这些信息,因为开发、测试和生产环境之间的拓扑会有所不同。本地名称空间的整个想法是隐藏各个供应商存储的方式,并使应用程序不依赖于供应商实现
循环是一种可以在服务器上配置的 WLM 策略。另一个选项是为每个集群成员赋予权重。
HTH
曼格鲁
The registration is actually done when the EJB application is started up. It uses the DD information to register with the WAS JNDI Server
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)
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