2 Replies Latest reply on Dec 3, 2007 1:09 PM by cypher073

    Problems accessing remote EJB

    cypher073

      So, I have 2 separate JBoss installations running on separate machines. One hosts an EJB application that exposes a remote interface for clients to access. The second is running an EJB client application that accesses the remote interface of the first. The client application contains a jar containing copies of the server classes it needs, referenced in the application.xml as an EJB module. In the client application, upon initialization, I'm setting the remote JNDI environment as follows:

      System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      System.setProperty("java.naming.provider.url", "jnp://<ip_of_first_server>:1099");
      System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

      And then getting an InitialContext in the usual way. The problem is that the client never seems to try to access the server's remote interface, and always tries to look locally. No errors are thrown at all. Is there something obvious that I'm missing here? Any help would be greatly appreciated.

        • 1. Re: Problems accessing remote EJB
          waynebaylor

          you're not getting a name not found exception, or connection exception? is the ejb application deployed to both app. servers?

          • 2. Re: Problems accessing remote EJB
            cypher073

            Well, one oversight on my part was erroneous handling of the exception that was being thrown -- I just never saw it. It was getting a name not bound exception, which then was easy to track down. The part that was really throwing me was the lack of an exception, which ended up being simple user error.

            Thanks for the reply!