|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ on AIX and connecting thru WAS 5 |
« View previous topic :: View next topic » |
Author |
Message
|
sanedevil |
Posted: Wed Jun 08, 2005 7:33 am Post subject: MQ on AIX and connecting thru WAS 5 |
|
|
Newbie
Joined: 08 Jun 2005 Posts: 6
|
Hi,
I'm new to the MQ world.
We have MQ running on an AIX machine. I want to receive the messages
1. using the APIs.
2. using MDB.
I've done the ff:
1. Created a Q connection factory
2. Created a Queue
3. Created a listener
However, for the 1st scenario, I get the ff error:
Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jms/b2bqconfactory, throwing ResourceAllocationException. Original exception: javax.resource.spi.ResourceAdapterInternalException: createQueueConnection failed
For the 2nd scenario, I am not able to start the listener.
I'm sure I'm missing something.
Pls help
tx in adv |
|
Back to top |
|
 |
vennela |
Posted: Wed Jun 08, 2005 8:04 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
What do you mean
Quote: |
1. using the APIs. |
Stand alone java programs ?
Where did you store the JNDI definitions. |
|
Back to top |
|
 |
sanedevil |
Posted: Wed Jun 08, 2005 7:54 pm Post subject: |
|
|
Newbie
Joined: 08 Jun 2005 Posts: 6
|
I'm trying to connect using the IntialContext and JMS API. Here's the code.
initCtx = new InitialContext();
QueueConnectionFactory qcf = (QueueConnectionFactory)initCtx.lookup("jms/b2bqconfactory");
QueueConnection conn = qcf.createQueueConnection();
QueueSession session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue) initCtx.lookup("jms/b2bqueue");
QueueReceiver receiver = session.createReceiver(q);
Message msg = receiver.receive(); |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Jun 09, 2005 2:07 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 09, 2005 12:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sanedevil wrote: |
I'm trying to connect using the IntialContext and JMS API. Here's the code.
initCtx = new InitialContext();
QueueConnectionFactory qcf = (QueueConnectionFactory)initCtx.lookup("jms/b2bqconfactory");
QueueConnection conn = qcf.createQueueConnection();
QueueSession session = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue) initCtx.lookup("jms/b2bqueue");
QueueReceiver receiver = session.createReceiver(q);
//before you can receive anything you must start the connection
conn.start();
Message msg = receiver.receive(); |
Don't forget to close the receiver, close the session and close the connection once you are done.
Enjoy  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|