4 Replies Latest reply on Sep 13, 2010 1:08 PM by Roque Pinel

    Can I get dynamically the URL of EJB server?

    Roque Pinel Newbie

      Hi,

       

      I'm developing applications that access EJB services from each other. Those application have their own JBoss server, and use a URL in the context to define where to look for the service.


      To make the enviroment more dynamically, I tought about using a kind o DNS for the EJB servers. However, I couldn't find nothing besides EJB clustering, like the article http://community.jboss.org/wiki/AccessEJBsRemotely


      Does anyone have a clue how to do it?

       

      Thanks,

      Roque Pinel.

        • 1. Re: Can I get dynamically the URL of EJB server?
          Wolf-Dieter Fink Master

          Hi Roque,

          if I understand right, you deploy an application to a JBoss server and use other applications at different JBoss servers.

           

          IMHO there is the following option:

          • all JBoss instances build a cluster (set UDP-address/port and partition name equal)
            the applications are still deployed as before
            in this case JBoss will detect the required bean for you

           

          But from my point of view it will be dangerous for transactions if you try to use it.

           

          I decide to deploy all applications within one JBoss together (mean all EARs together at one instance).

          In this case you do not need to think about how to find the other application. Also you don't have remote calls.

           

          Drawback is the influence between the applications (JVM, GC, MemoryLeak ...)

          • 2. Re: Can I get dynamically the URL of EJB server?
            Roque Pinel Newbie

            Hi Wolf-Dieter Fink, thanks for the reply.

             

            You got it right, I'm running the applications in differents JBoss.

             

            The problem is that I can't have just one JBoss for all the applications, it would overload the server...

             

            I managed to access EJB services from others JBoss, but I'd like to have a system that could discover the URL
            of the EJB's server desired. This way, the servers could be more flexibles.

            • 3. Re: Can I get dynamically the URL of EJB server?
              Wolf-Dieter Fink Master

              Hi Roque,

              do you overload a server if you install both applicationsin one server? oohh that is a heavy weight one!

               

              If it is not possible or wanted to run the application within the same cluster you might try the autodiscovery feature.

              Set only the correct autodiscovery address within the JNDI lookup (autodiscovery is enabled by default).

              Remember that network multicasting must be enabled between the two JBoss installations, network switches often drop this packages!

               

              In this case the other JBoss(es) will be found by network broadcast you only have to configure autodiscovery correct.

               

              But I still suppose there is a chance to run both applications within one server and build a cluster of JBoss instances to handle the load.

              1 of 1 people found this helpful
              • 4. Re: Can I get dynamically the URL of EJB server?
                Roque Pinel Newbie

                I'll try the autodiscovery approach.

                 

                Thanks for the replies.