Hello all developers,
I need some advice here please, I will try to explain as best I can and be as short as possible:
[How to share temporary, continuously changing data between clients in EJB's]
I need to create a "File server" that collects data on demand from an external URL, each service will fetch live data, and deliver the data to clients.
Each "server instance" will be responsible for collecting live data, and the amount of "server instances" will be one per resource file.
The reason for this is to minimize the network traffic to the external URL's.
External URL File 1--------------------------> [ server instance 1] ---------------------->[ serving clients one two and three]
External URL File 2--------------------------> [ server instance 2]----------------------->[ serving clients four and five]
External URL File 3--------------------------> [ server instance 3]----------------------->[ serving clients 6 to 1000]
I guess the server can not be a
servlet, since each request/client gets a
new instance;
I am not sure if EJB's behave the same ... I presume the same.
I have searched on "Singletons" but seems that might be problematic too... and server specific, seems Glassfish does offer a singleton EJB.
Any advice please.... What can one use EJB/SERVLETS/etc.