Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Cannot remotely find JNDI resources using InitialContext.

Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Follow up on this thread:

I've got 2 laptops here, running next to eachother, connected to the same network switch. One is running an almost default instance of glassfish 3x, the other is running a client OUTSIDE of the container comprised of only a few lines of code to get a connectionFactory from the Glassfish server.
Running both on the same machine works like a charm now, but when ran on different machines it refuses to connect, and my head-ache is now getting worse by the minute...

Server side:
Running inside Netbeans IDE 7.2

GlassFish Server version: 3+
JMS Service Type: LOCAL (instead of EMBEDDED)
Created javax.jms.QueueConnectionFactory named "TapServiceConnectionFactory" under JMS Resources.

Glassfish configuration is otherwise untouched (I've fooled around lots, so created a clean glassfish instance for this example):

Startup log:


Simple maven application containing 1 class with a main-method:


This is what happens if my glassfish server is running and the client is started:

Also not very sure which port to use, 3700 (JMS) or 7676 (IIOPS), however, I've tried both, but both fail.
I'm out of ideas :/
Posts: 1104
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you let us know how you solved your earlier problem? That may provide some pointers.
Gerben Feenstra
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found another way to get things working. My initial JNDI-problem however was solved by using...

... instead of setting Context.PROVIDER_URL.

Also, the only way I got things working at all is using a dependency on glassfish-embedded-all, which is a 35MB Jar. Which sounds kind of insane to me, considering I only want to sent simple text-messages to a queue. How hard can that be? Communication with code running outside a container is a major flaw in JEE in my opinion.

Anyways, thanks for the help.
Problems solved, thread closed.
New rule: no elephants at the chess tournament. Tiny ads are still okay.
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic