2 Replies Latest reply on Apr 5, 2012 5:38 PM by rzvikas

    Can EJB component know what host and port it is deployed on ?

    rzvikas

      Is there any way to find the hostname and port number information from the deployed EJB ?

        • 1. Re: Can EJB component know what host and port it is deployed on ?
          jaikiran

          Which hostname and port and why do you need it in the EJB?

          • 2. Re: Can EJB component know what host and port it is deployed on ?
            rzvikas

            So use case is like this : We are running same application on different machine and from client we wanted to know how many instance of application are running on different machine.

             

            Application 1  - EJB Engine Server instance  1

            Application 1 - EJB Engine Server instance  2

            Application 1 - EJB Engine Server instance  3

             

             

            I was thinking when we start server and deploy EJB, EJB should know what host / port it is running on.... we can publish message to cnetral place which can maintain the state of all server instances.

             

            I am using EJB 3.1....do you know if we can get information form EJB context ?