7 Replies Latest reply on May 14, 2010 3:19 AM by jaikiran

    App server location

      Hi All,

       

      we are using jboss in our project and have a requirement to find the app server location on the client browser.

       

      possible solutions:

      1, Find the App server IP address and locate the server location based on it - This is not feasible in our project as it includes external API call.

      2, Find the locale of the response object and identify the app server locale (which is expected to be very specific to it location).

       

      Is the second approach a valid one to find the app server location?

      If so how do I modify the default server locale on jboss server?

       

      Also is there an alternate (easier) approach to find the app server location?

       

      Version - jBoss 4.2 [EAP] license

       

      Thanks

      Gopi

        • 1. Re: App server location
          jaikiran

          Gopi Kannappan wrote:

           

          Hi All,

           

          and have a requirement to find the app server location on the client browser.

           

          Why?

          • 2. Re: App server location

            Hi Jaikiran,

             

            I need this information for my analytics tool.

             

            Thanks

            Gopi

            • 3. Re: App server location
              jaikiran

              Gopi Kannappan wrote:

               

              I need this information for my analytics tool.

               


              How exactly are you going to use the (remote) physical location of the application server in the analytics tool? And why does that client side tool require that information?

              • 4. Re: App server location
                rouvas

                Can't you have the application server respond with its location?

                Perhaps in the HTTP headers.

                If your client is running in a browser, you can use XMLHttpRequest().getAllResponseHeaders() to inspect the response.

                If not, it is even easier.

                • 5. Re: App server location
                  meme

                  Hi,

                   

                  If I understand correctly you've got a client and several JBoss server and the client should find

                  them without knowing their IP-Addresses, correct? If so I would see two ways:

                  a) A few years ago I've read that it's possible to use the InitialContext factory without specifying

                  the ip-address when the servers are in cluster mode. Then the factory should do a multicast to find the cluster nodes.

                  May be that might be a starting point.

                  b) A similiar approch would be to implement a ZeroConf-Service for the JBoss servers. Then you have to

                  implement the other part on the clients.There are two ways to configure zeroconf: The first is that the servers

                  have to register on a single point to be available. The other way is that they'll respond to a multicast.

                   

                  Marc

                  • 6. Re: App server location
                    jaikiran

                    Ah! Gopi, Sorry I completely misunderstood your question in the first post. I don't know why I started thinking that by "App server location" you actually meant the physical disk location on the server where the AS is installed (ex: /home/me/jboss-5.1.0.GA). And that's the reason why I kept asking why do you want that information.

                     

                    But after reading Marc's reply and re-reading your first post, I realize I misunderstood your question.

                    • 7. Re: App server location
                      jaikiran

                      Gopi Kannappan wrote:

                       

                      Hi All,

                       

                      we are using jboss in our project and have a requirement to find the app server location on the client browser.

                       

                      possible solutions:

                      1, Find the App server IP address and locate the server location based on it - This is not feasible in our project as it includes external API call.

                      2, Find the locale of the response object and identify the app server locale (which is expected to be very specific to it location).

                       

                       

                      And the more I read that question, the more confused I am. So are you saying that if the client browser requests http://blah.com then you would first get the IP of the server and then find out in which country/city the server is located? Is that what you are after? Could you explain exactly what you need (with an example, preferably)?