1 Reply Latest reply on Feb 29, 2004 12:56 AM by anamika

    Calling an ejb of remote server from another ejb

    anamika Newbie

      hi all,

      I have the same requirement as specified in the thread
      (calling a function of another ejb residing on another server)

      When i followed the thread, i got the result also. Now i can communicate between the ejbs.

      Again i have a problem. When i specify the context properties in the code, i am forced to specify the provider url of the remote machine for remote ejb communication. this makes some difficulty for generalization.

      I have specified the ejb reference of remote ejb in ejb-jar.xml and corresponding specification is there in jboss.xml like this



      In jboss.xml

      <jndi-name>jnp://remote machine ip:1099/ejb/BEJB</jndi-name>

      At the time of deployment, server is identifying the external referenced ejb along with its path. So i need not give any url at context properties. Isn't it? but when i take the url specification from context properties, it is showing ejb not found exception. The exception is like this.

      javax.naming.NameNotFoundException: BEJB not bound
      21:31:00,000 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      21:31:00,000 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      21:31:00,000 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      21:31:00,000 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
      21:31:00,000 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
      21:31:00,000 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:493)
      21:31:00,015 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:472)
      21:31:00,015 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:347)

      If anybody knows the solution pls help me. i am stumped now......