7 Replies Latest reply on Oct 10, 2014 8:24 PM by stonesoft

    JBoss to JBoss EJB communication

    kaushik.sharma

      Hi,

       

      The procedures given in EJB invocations from a remote server instance - JBoss AS 7.1 - Project Documentation Editor works fine to invoke EJB running in a JBoss server from another JBoss server. However it requires that the client JBoss should know the IP address of the  server JBoss at the deployment time. (the server JBoss IP is added in the standalone.xml of the client JBoss). But in our case, the IP address of the server JBoss is not known until the run time. We cannot add the server JBoss IP address in the standalone xml or redeploy the client EJB when a new server JBoss is added. Please suggest what can be done? 

       

      Thanks much

      Kaushik

        • 1. Re: JBoss to JBoss EJB communication
          wdfink

          You might check the remote-naming or the scoped context (since 7.2) approach.

          It depends on your requirements what is appropriate.

           

          Remote EJB invocations via JNDI - EJB client API or remote-naming project

          Scoped EJB client contexts

          • 2. Re: JBoss to JBoss EJB communication
            stonesoft

            I have the same issue and I was wondering if there no solution if you can't purchase 7.2?  If I am correct 7.2 is the version that requires you to purchase a license if you want run it in a production mode?

             

            thanks

            -kevin

            • 3. Re: JBoss to JBoss EJB communication
              wdfink

              No, as long as you use AS7 (or even WildFly) bits from github this is open source.

              But if you download EAP6.* from the download pages you have a 0$ subscription and you agree that you have to buy a subscription if you use that bits in production.

               

              So it is possible to use the github repository (which has renamed to wildfly) and build the 7.2.0.Final tag or others by yourself.

              Remember 7* is JBossAS, since 8* it is WildFly and there are a lot of changes

              • 4. Re: JBoss to JBoss EJB communication
                stonesoft

                Thank you for your answer.  I am going to try to build 7.2 myself.  I also found the 7.2 binaries built from the source by a company named OpenLogic.

                • 5. Re: JBoss to JBoss EJB communication
                  stonesoft

                  Ok so I got the source and I am trying to build it.  But before I go too far I want to try to resolve something.  The application that I am trying to get work is EJB1 in Jboss on one server invokes EJB2 in Jboss on another server.  EJB1 does not know the IP for EJB2 until runtime (it could be 1 of 20 or so IPs).  I was reading your 2 suggestions:  "Remote EJB invocations via JNDI..." and "Scoped EJB client contexts" and I am confused.  On the Remote EJB invocations via JNDI page it says, "It is not possible to use remote-naming if the client is an application deployed on another JBoss instance."  Does this mean that I cannot use remote naming for my example?  Finally, is there an example somewhere that shows EVERYTHING that I need to do in order to get my EJB1 to be able to invoke EJB2 (in Jboss 7.2)?

                   

                  thanks again

                  • 6. Re: JBoss to JBoss EJB communication
                    kaushik.sharma

                    I too have the same confusion as Kevin. Is it possible to dynamically invoke from JBoss1::EJB1 to JBoss2::EJB2 when the JBoss1 server does not know the IP address of the JBoss2 server until runtime? Is it some limitation of EAP 6.1, which I am using in my development set up?


                    thanks, kaushik

                    • 7. Re: JBoss to JBoss EJB communication
                      stonesoft

                      Hey Kaushik

                       

                      I have given up on getting EJB to remote EJB to work.  I have tried so many examples and I can't get any of them to work.  I am going to rewrite the code we have that uses remote EJBs and use a web service instead.  Good luck, I hope you are able to find an answer.