3 Replies Latest reply on Jan 30, 2006 11:53 AM by chetan aggarwal

    Remote Resources in EJB java:comp/env/ ?

    julien reboul Newbie


      I wanted to know if it is possible to access to remote resources from inside an EJB without pre-loading them in the HAJndi (if I've understood well how it works).
      I'm actually deploying my application on a jboss cluster (2 nodes for the moment). With one EJB on one node, I'm trying to access to a queue on the other node. I'm trying to use the ENC (entreprise naming context) to do it but when I do my lookup (ctx.lookup("java:comp/env/queue/RssItems")) a NameNotFoundException is raised whereas when I do a global lookup (ctx.lookup("queue/RssItems")) it simply works.

      The same thing happens when I'm trying to call a remote service in the same way.

      However, it seems to work perfectly when I make first a global lookup and then a ENC lookup.
      Is this because the HAJNDI doesn't link the different references automatically when the ENC is called ? or have I done something wrong?

      I'm using jboss-4.0.3SP1 on j2sdk1.4.2 on Win2k