0 Replies Latest reply on Nov 29, 2001 8:45 AM by Ben Turner

    Communicating with JBoss JNDI from seperate container

    Ben Turner Newbie

      I'm having trouble with a particular Web containter not talking to my JNDI service running in JBoss

      My setup is this :
      I have 2 machines with JRun and JBoss (standalone) running on both of them.
      I have written some EJBs for JBoss and some Servlets for JRun that call the EJBs.
      To get JRun to talk to the JBoss JNDI (rather than it's own) I added the following jndi.properties file into the web app's classpath :


      (I have tried using the fully qualified machine name as well as localhost).

      On my first machine, this works, and my app is looking all finished. On the seoncd machine, this doesn't work - when I try and look up the beans I get a "comp not bound" exception.

      So by altering the second line of my jndi.properties file I did the following :
      I tried to get the JRun on the 1st machine to talk to the JBoss on the 2nd machine - this worked.
      I tried to get the JRun on the 2nd machine to talk to the JBoss on the 1st machine - this failed.
      I wrote a test script to talk direct to the JBoss (run on a completley different machine). This worked on both machines.

      So it appears I have an issue with my Web Container not being able to talk to my JBoss.

      The failing web code DOES retrieve an "InitialContext" object, but fails on the "Lookup" method - does this mean it HAS contacted an instance of a JNDI service - or would this same "comp not bound" error happen if I tried to connect to a non-existant JNDI service too ?

      I'm not really expecting an answer from this thread (I'm sure it's something in my setup - but what !) however, I am not too hot on how to debug JNDI connection issues, and could do with any ideas of things to try anyone might have ? Or similar experiences ?

      Thanks in advance for all replies,
      Ben Turner