my dog learned polymorphism*
The moose likes JBoss/WildFly and the fly likes ConnectionFactory lookup returns null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "ConnectionFactory lookup returns null" Watch "ConnectionFactory lookup returns null" New topic
Author

ConnectionFactory lookup returns null

Juliana Leroy
Greenhorn

Joined: Sep 16, 2003
Posts: 4
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.
Amir Pourteymour
Ranch Hand

Joined: Mar 06, 2008
Posts: 45
It might be because you have not created any connection inside the ConnectionFactory.
Juliana Leroy
Greenhorn

Joined: Sep 16, 2003
Posts: 4
And how can I do that?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9953
    
161

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.


[My Blog] [JavaRanch Journal]
Juliana Leroy
Greenhorn

Joined: Sep 16, 2003
Posts: 4
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ConnectionFactory lookup returns null
 
Similar Threads
Having problems finding mqseries queues in java bean
New to CORBA, problem with java client application
Which jar file in WAS v5 contains DataSourceFactory
unable to get Naming Context
JMS and JNDI