• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ConnectionFactory lookup returns null

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm having a problem doing a lookup in a QueueConnectionFactory from a remote client application.
The jndi name is found but the lookup method always returns null.
I'm using JBoss 4.2.2GA, integrating with WebsphereMQ 6.0.

Here's the part of my code:



The message "null" is always displayed.

Thanks for the attention,
Juliana.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It might be because you have not created any connection inside the ConnectionFactory.
 
Juliana Leroy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And how can I do that?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Juliana,

Welcome to JavaRanch

How did you setup WebSphereMQ with JBoss? You might find this useful.

Looks like you are doing a lookup of the connection factory from a standalone client (i.e. a remote client). Based on what i have seen in one of the discussion in the forums, the reason why you might be getting a NULL connection factory maybe because the connection factory is meant to be used only in a managed environment and not through remote standalone client. Try looking up this connection factory from a servlet and see if you get the connection factory.
 
Juliana Leroy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jaikiran,

Thanks for the reply.
I setup MQ with JBoss following the part IV of the article and an article from IBM (http://www.ibm.com/developerworks/websphere/library/techarticles/0710_ritchie/0710_ritchie.html).
Yes, I'm doing a lookup of the connection factory from a standalone client and I need to do this in this way.
When I run the sample application that comes with the IBM connector, which has a servlet and an MDB, it worked fine.
Is there another way of doing that?

Juliana.
 
Forget Steve. Look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic