0 Replies Latest reply on Oct 11, 2007 12:41 PM by John Smith

    virutal-host question

    John Smith Newbie

      We have a WAR file we deploy (app1) that defines 2 virtual-hosts "vhost1" and "vhost2". Within this WAR we have a singleton class named "FooSingleton" which has a getInstance() method. Also within the WAR is a JSP page which simply gets a FooSingleton instance and reloads an internal array list from a data source.

      Now we have another application (app2) that is deployed within the same JBoss. There is a class which calls the JSP in app1 to update that applications ArrayList with new data from the data source. Currently we only call the JSP in "vhost1", thinking since FooSingleton is a singleton class it would update both "vhost1" and "vhost2". However this is not the case. We need to call the JSP in both "vhost1" and "vhost2" in order to update both.

      Is it possible to have FooSingleton update both virtual hosts at the same time by calling only 1 virtual host? I doubt it and if we could it might not be a good solution.

      What would be the best way to call make a single call from app2 to app1 to update the data from the data source? JMS might do the trick however we don't have the time to set something like that up...

      Thanks for your help,
      - John