This week's book giveaway is in the Functional programming forum.
We're giving away four copies of A Functional Approach to Java: Augmenting Object-Oriented Java Code with Functional Principles and have Ben Weidig on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

WSAD5.1.3 remote MQv5.3 connection and listen using MDB

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can successfully run MDB to listen for messages and use session bean to put messages in a queue using WSAD5.1.3 and MQ Simulator (part of WSAD Test Server).

However, I want to connect to an external MQ box (AIX platform, OS version 5.2) that is running MQ5.3 with fix pack CSD08 from my local windows WSAD box, running WSAD 5.1.2 by configuring WSAD Test server.

I made following configurations in WSAD Test Server:
listener port, EBj, Security

I made following config in WSAD using Admin Console:
QueueFactory, QueueName, Channel etc for Websphere MQ JMS provider tab.

I can additionally connect to the external MQ box from my local Windows machine.

However, when I start WSAD Test server, I get exceptions:

Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jms/qFactory, throwing ResourceAllocationException. Original exception: javax.resource.spi.ResourceAdapterInternalException: createQueueConnection failed
at com.ibm.ejs.jms.JMSCMUtils.mapToResourceException(JMSCMUtils.java:125)
at com.ibm.ejs.jms.JMSManagedQueueConnection.createConnection(JMSManagedQueueConnection.java:193)
at com.ibm.ejs.jms.JMSManagedConnection.<init>(JMSManagedConnection.java:193)
at com.ibm.ejs.jms.JMSManagedQueueConnection.<init>(JMSManagedQueueConnection.java:65)

....................
.......................
Next Linked Exception:
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'myHost-01d:myQueueMgr'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:546)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1450)
at com.ibm.mq.jms.MQConnection.createQMXA(MQConnection.java:915)
..................................
...................................

Next Linked Exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059

..........................
.........................
[4/18/05 16:50:06:594 EDT] 3d4b491e ConnectionMan E J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection: javax.resource.spi.ResourceAllocationException: createQueueConnection failed
at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1351)
...........................
...........................
---- Begin backtrace for Nested Throwables
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'myHost-01d:myQueueMgr'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:546)
.....................
.....................
---- Begin backtrace for Nested Throwables
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2059

.....................
.....................
[4/18/05 16:50:06:609 EDT] 3d4b491e MDBListenerIm W WMSG0019E: Unable to start MDB Listener MyMDBean, JMSDestination jms/SAM.TEST : javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'myHost-01d:myQueueMgr'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:546)
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you cannot connect to a remote system using the embedded messaging provider with WSAD. You must use the full MQ websphere 5.3 server to connect to an external remote queue manager.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My system is as follows:
WSADIE v5.1.1 with WMQ 5.3.9

I want to set up my development environment to use external MQ. However, when I configure the queue and queue manager resources I get the following nested exceptions:

J2CA0020E: The Connection Pool Manager could not allocate a Managed Connection:
...
javax.resource.spi.ResourceAllocationException: createQueueConnection failed
...
javax.resource.spi.ResourceAdapterInternalException: createQueueConnection failed
...
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:WAS_localhost_server1'
...
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
...
MQJE011: Socket connection attempt refused
...
Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
...
MQJE011: Socket connection attempt refused

Since the dev env and the MQ are both on the same box, I know they can communicate in a simplified way. So, when I created these resources I left the channel, host, and port all empty, because I did not need to switch from bindings to client mode.

Now, I even tried the suggestion from glbondy, but that didn't seen to help, so I ended up changing my queue manager from host_name to localhost.

One question I have is why the name of the queue manager in the exception is 'localhost:WAS_localhost_server1' instead of simply 'WAS_localhost_server1'.

On last thing, I have operating system security turned on. But, again, I think this issue falls away because I'm using the pieces all on the same box. WMQ should assume that, since the request isn't coming across from a remote client, that the caller is already authenticated.

Any and all help would be greatly appreciated.

-joe
 
Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had success in connection to Remote MQ box from my local WSAD Test server. JMS radio button has to be disabled in WSAD Test Server configurations. All other configurations. You need at a minimal MQ Client (not full client and Server) in your local machine to connect to remote MQ box. All configurations in WSAD have to be done via Admin console. Thhe configuratiuons necessary in WSAD is the same as if you were using WAS box instead to connect to remote queue.
Settings required are:
A) Disable JMS in WSAD Test Server.
B) Enable Admin console in WSAD Test Server.

Open Admin Console of WSAd Test Server. Do the following configurations:

1) Add a Variable to point to the location of MQ Client in your local box(need to install MQ client in local WSAD/WAS box).
2) Add Message Listener though Listener Port link
3) Configure Connection Factory
4) Configure Queue

You need to know Channel information.

The same setting can be done in WAS box (also in WSAD) to connect to remote queue.
 
Joseph Marques
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had success in connection to Remote MQ box from my local WSAD Test server.

>> I'm trying to connect to MQ on the same box, which is why "bindings" mode is allowed, instead of "client" mode. Bindings then relieve the administrator from providing a channel, port, and host.

JMS radio button has to be disabled in WSAD Test Server configurations. All other configurations.

>> Yup, everything is definitely disabled on the JMS tab in the server configuration.

You need at a minimal MQ Client (not full client and Server) in your local machine to connect to remote MQ box.

>> Hmm...this makes me question something: How exactly does the app server communicate to MQ if they are both on the same box? I would like to assume that it shouldn't need the client to be installed at all, but I suppose I should look it up just to be sure.

All configurations in WSAD have to be done via Admin console. Thhe configuratiuons necessary in WSAD is the same as if you were using WAS box instead to connect to remote queue.
Settings required are:
A) Disable JMS in WSAD Test Server.
B) Enable Admin console in WSAD Test Server.

>> yup, did that

Open Admin Console of WSAd Test Server. Do the following configurations:

1) Add a Variable to point to the location of MQ Client in your local box(need to install MQ client in local WSAD/WAS box).
2) Add Message Listener though Listener Port link
3) Configure Connection Factory
4) Configure Queue

>> Yup, I did all of that too. One question: is it OK if the location of my MQ variable has spaces in the directory name?

You need to know Channel information.

The same setting can be done in WAS box (also in WSAD) to connect to remote queue.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic