views:

1733

answers:

3

I have an application that uses WebSphere MQ Java API along with a configuration (xml) file to access MQ. I would like to migrate to WebSphere JMS API. For this i try creating 1) WebSphere MQ Queue Connection factory and 2) WebSphere MQ Queue destinations from my local WAS. When i configure my Queue destinations and try to set my MQ Config parametes i get an error message like "WMSG0316E: You tried to view a Queue that was not a local Queue. Only administration of local Queues is supported."

The message is correct in the sense that i am trying to connect to a remote queue. Now, cant i configure my WAS as an MQ client trying to connect to a remote Queue ? The MQ Client has the necessary MQ JMS jars in the server classpath.

Would appreciate if anyone could throw some light into this.

A: 

I cut & pasted your error message into Google. In their inimitable style, here are the IBM docs on your issue. Helpful, no?

Where did you set up the queue that you're trying to contact? Is it running on the same server as the WebSphere instance you've deployed on, or is it a remote server? If it's the latter, I wonder if you need a bridge or proxy so you can appear to send the message locally but have it appear on the remote server via proxy.

UPDATE: I don't know, but perhaps one way to get around this is to set up a local queue, similar to what you say is working, and have it simply forward all messages to the remote queue.

duffymo
The MQ is running in a remote server. This is where i am stuck - "..appear to send the message locally.."I did try installing MQ 6 and WAS on the same system and the JMS worked fine. However, when MQ is in a remote system, whose IP address i specify while configuring JMS resources, i get this exception.
Subramanian
A: 

Can you clarify something. You say that you 'Create' the connection factory and queue destination from your local WAS. Do you mean you are constructing the objects yourself?

If so, this is the wrong approach, you should be configuring the resources as part of your applications configuration and then looking them up via JNDI. The configuration is where the local JMS resources are bound to the actual implementation, in your case the remote MQ server. Your code should only be bound to JMS, not the specific implementation.

Robin
I am "configuring" WebSphere JMS resources namely the MQ Queue ConnectionFactory and MQ Queue Destination in WAS. The code is only bound to JMS and not to the implementation - that was very purpose of making this change. I am not constructing the objects myself.Sorry for the wording - 'create' - if that caused some confusion.
Subramanian
@Subramanian - The problem was more with your usage of MQ when referring to JMS resources. (i.e. MQ Queue ConnectionFactory instead of Queue ConnectionFactory). I thought you may have been referring to MQ specific artifacts instead of JMS.
Robin
A: 

I'm working on this same issue - I've found articles where the authors confirm that WebSphere has to be told that "client to remote queue" mode is desired, but I have yet to find details on how to do that, beyond one author mentioning an environment variable.

Still searching ... I'll post the solution if I find one.

Matt Samudio
The solution was to set the "Transport type" setting in the JMS queue connection factory config to "client" instead of "Bindings". This is located in the WAS admin console, under "Resources" -> "JMS Providers" -> "WebSphere MQ" -> "Additional Properties", where there is a "WebSphere MQ queue connection factories" item, which takes you to a list of your queue connection factories. The queue that you're using (as specified in your listener port settings) is where the setting to change is.Hope this helps,Matt
Matt Samudio