Java Application & Application Servers
Posted on 2005-03-01
I am in the process of developing/setting up an application server(Apache Tomcat and an RDBMS) and add the necessary functionalities to provide some kind of a publish-subscribe mechanism.
I would like to be able to develop a Java-based GUI that allows the user to use to connect to the app server to subscribe for a certain type of data. When that requested data is available it will be pushed to the subscriber.
One way I can think of is as part of subscription, the subscriber will provide enough info (hostname, port number, etc...) so that the server will know who and where to 'push' the data to. But that requires the subscriber (java app) to go into a continuous loop to listen for incoming data. Is there a better and more graceful way of accomplishing this without using the polling mechism?
Any pointer is greatly appreciated.