0 Replies Latest reply on Jul 30, 2008 9:02 AM by dbturner4

    Calling EJB in another JBoss server

    dbturner4

      I'm trying to call an EJB that's on a remote JBoss server from another JBoss server. I want to configure this through deployment descriptors so I can have interoperable lookups ( corbaname:iiop::#<jndi-name> ), but I'm getting the following error:

      Root exception is javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]]

      Can anybody help me out? I'm using EJB3 and JBoss 4.2.2. Is the web.xml file correctly setup for EJB3 (it uses the home & remote tags not sure how the home tag applies in EJB3)?


      My description files are setup as follows:

      jboss-web.xml:

      <ejb-ref>
      <ejb-ref-name>UserService</ejb-ref-name>
      <jndi-name>corbaname:iiop:server2:3528#cae/UserService/remote</jndi-name>
      </ejb-ref>


      web.xml:

      <ejb-ref>
      <ejb-ref-name>UserService</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type> com.nhbb.cae.commons.service.user.UserServiceLocal com.nhbb.cae.commons.service.user.UserServiceRemote
      </ejb-ref>


      In my code (web tier) I attempt to look up the remote bean with:

      Context ic = new InitialContext();
      Object o = ic.lookup("java:comp/env/UserService");