Author |
Message
|
niagarwal |
Posted: Tue Mar 10, 2009 12:40 am Post subject: Help required for configuring MDB on websphere |
|
|
Newbie
Joined: 09 Mar 2009 Posts: 4
|
Deleted
Last edited by niagarwal on Wed Dec 22, 2010 6:30 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 10, 2009 12:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Moved to correct section _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Mar 10, 2009 12:58 am Post subject: Re: Help required for configuring MDB on websphere |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
niagarwal wrote: |
I have a requirement to consume messages from websphere MQ at remote host.
|
Ok, my MDB sucks so I could be holding entirely the wrong stick by the wrong end, but you'd need to be connected to the host where the messages are held; you can't consume from a remote host. You can consume from a queue manager running in a different machine to your app however; the one thing missing from your excessively verbose post is details of the QCF and queue.
Please see other posts in this forum for the WMQ definition of "local" and "remote". _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
niagarwal |
Posted: Tue Mar 10, 2009 2:14 am Post subject: |
|
|
Newbie
Joined: 09 Mar 2009 Posts: 4
|
Deleted...
Last edited by niagarwal on Wed Dec 22, 2010 6:33 pm; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Mar 10, 2009 3:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Clearly you have issues: either with your coding or your config.
On the Destination try removing any information for a channel, host, port, qmgr. The listener port for the MDB should have a reference to your qcf and a reference to the destination. These are 2 JNDI references.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
niagarwal |
Posted: Wed Mar 11, 2009 3:16 am Post subject: |
|
|
Newbie
Joined: 09 Mar 2009 Posts: 4
|
Deleted
Last edited by niagarwal on Wed Dec 22, 2010 6:32 pm; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Wed Mar 11, 2009 3:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
niagarwal wrote: |
If anybody know please let me know if something is wrong in the code. |
Not wrong, but if you caught the linked exception with the JMS error, you might get a more informative error. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Mar 11, 2009 3:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Everything is wrong with the code.
You have a full confusion with the MessageListener interface of the MDB and the Listener definition required by WAS to run the MDB.
In the MDB all you have to do is implement the onMessage method.
There should be absolutely no code relative to the connection. For a standalone I would suggest that you deal with connection in a different class.
In the MDB setup in WAS you define a Listener (WAS configuration construct). That listener has a reference to your JNDI for the qcf and the destination.
Your coding makes sense if you are trying an outbound connection. But then how would you ever invoke the onMessage method when clearly you don't have a javax.jms.Message to pass to it?
If you are building some kind of a bridge remember some of the conditions /restrictions on MQ. You want to make sure you are using a client connection to MQ. Make also sure your MQ connection factory has the attributes FailIfQuiesce set.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
WMBDEV1 |
Posted: Mon Mar 23, 2009 8:16 am Post subject: |
|
|
Sentinel
Joined: 05 Mar 2009 Posts: 888 Location: UK
|
I'm not sure if you are using message listener ports or not (its hard to say as this is the one detail i think you missed) but Message Listener ports are deprecated and you should use the activation spec instead. Also as previusly stated, I think you should implement the javax.ejb.MessageDrivenBean interface. |
|
Back to top |
|
 |
|