开发者

How to JNDI lookup from cluster 1 : a queue that exists in cluster 2 in Websphere 6?

开发者 https://www.devze.com 2022-12-31 11:44 出处:网络
I have a Websphere topology wherein in Cluster1, I have an MDB that\'s trying to publish to another MDB that resides in Cluster2. Since they\'re both in the same container, I tried simply

I have a Websphere topology wherein in Cluster1, I have an MDB that's trying to publish to another MDB that resides in Cluster2. Since they're both in the same container, I tried simply

Blockquote Context ctx = new InitialContext(); ctx.lookup("jms/MyQueue"); Blockquote

The "jms/MyQueue" is configured in Cluster2. As you can see, this doesn't work!! 1) Do I have to provide an environment entry while creating the InitialContext? Even though both clusters are part of the same container? 2) If not, how the开发者_如何转开发n can I lookup the said queue in Cluster 2?


I would recommend using a cell-scoped queue resource rather than a cluster-scoped queue resource. To answer the specific questions:

1) Do I have to provide an environment entry while creating the InitialContext?

No, if the clusters are part of the same cell. Otherwise, you need to specify an alternate PROVIDER_URL.

Even though both clusters are part of the same container?

I don't know what this means. Do you mean "cell" rather than "container"?

2) If not, how then can I lookup the said queue in Cluster 2?

Using a topology-based qualified name:

Context ctx = new InitialContext();
ctx.lookup("cell/clusters/cluster2/jms/MyQueue");
0

精彩评论

暂无评论...
验证码 换一张
取 消