My glassfish4 Admin Console clearly shows under Resources/JMS Resouces/Connection Factories that I have a ConnectionFactory properly configured with a JNDI name = "jms/goConnectionFactory"
So by all that's holy, and many many postings, this code should result with my Java client in possession of that Connection Factory. But it refuses.
Can anyone please help?
Here is the code.
println(jndiContext.toString()) statement in the code prints this to the console
So I have some kind of context, I just don't know how to test it to see if it is really from glassfish or some Default context.
A try catch block around lookup() catches a NullPointerException.
I have glassfish-naming.jar in my path. It clearly contains com.sun.enterprise.naming.impl.SerialInitContextFactory.
Ditto imq-4.2.jar that has a lot of com.sun.messaging and com.sun.jms classes.
I can't see anything in the server log that indicates glassfish even notices when my client runs the above code.
I mean its such a trivial bit of code ... and such a common test environment (i.e. local Eclipse java client trying to get a connection to a local glassfish server) there must be hundreds of examples. But I can't find one. (Oracal is so focused on interactions between EJB containers it seems blind to anyone using a plain old java client.)
Ditto most other postings ... Session beans to other Session beans ... on same servers or separate ones. And they all use injection instead of properties.
Here is a complete truncated Class whose only purpose is to secure a ConnectionFactory.
Here is the console ouput.
I tried to attach a screen shot of my glassfish console that shows there really is a ConnectionFactory configured under Resources/JMS Resources/Connection Factories with a jndi name of "jms/goConnectionFactory". But the web page doesn't seem to show it on preview. If it doesn't show up I'll try again all by itself.
Note: The attachment to the first post mistakenly showed the jms.Queue resources, but my local client never has to look them up. So I'm sure if I can get a ConnectionFactory the rest will fall back into place.
I truly appreciate any help or suggestions. This seems to be about as simple a step, using the simplest test code, with the most generic set up, I can imagine. And it's been defeating me all week.