1 Reply Latest reply on Nov 8, 2012 8:09 AM by jaikiran pai

    Accessing an EJB in Jboss 5 from client on Jboss 7

    Felipe Nova Newbie

      I have an application on JBoss 7 which accesses an ejb that is in Jboss 5 and did everything told to do:

      -I have created a module with all the libs directory "client" and also the file module.xml.

      -I have created a module with the. Client jar file and my Ejb module.xml the dependency on previous module.

      -In my application on file jboss-deployment-structure.xml put the dependency module with my previous EJB client and part of exclusions I put the module org.picketbox.

      - My lookup was this:


      Object retorno = null;
              ClassLoader previousTCCL = Thread.currentThread().getContextClassLoader();
              ClassLoader classLoader = ClienteGesticServiceRemote.getClassLoader();
              try {
                Properties env = new Properties();
                  // Invoke the service
               //Verify all the ctx list
                  Context ctx = new InitialContext(env);
                  NamingEnumeration<?> namingEnum = ctx.list(""); 
                  System.out.println("@!@!@! BEGIN");
                    Object obj = namingEnum.nextElement();   
                  System.out.println("@!@!@! END");
                  retorno = (Object) ctx.lookup("clienteGesticService");
              } catch(Exception  e){
              } finally{


      But it returns me NamedNotFoundException, but there in Jboss 5 I use @ RemoteBindings named clienteGesticService.
      From 5 to Jboss he works with that name but not the Jboss 7.
      In the code that has put a part that I see who's in context and apparently only shows me the respect of my Jboss 7 spot and not the remote Jboss 5.
      I need it urgently who can help me I thank you.