I have been searching for a solution of this for a while. I still don't quite understand how this can be achieved. Let me first explain my project.
What I have are:
PostgreSQL DB
Tomcat 6.0
Hibernate 3
Flex Data Services 2.0.1
The final application should work like this: A user opens up the Flex client. The Flex client uses Flex DS and queries 10000+ geometrical objects from the DB through Hibernate (the server should keep a copy of all the objects in its memory). The user selects which objects he is interested in (using checkboxes, for example). The request is then send back to the server. The server compiles a KML file according to the users pick, setting the visibility of the ones he's interested to "visible" and else to "invisible". Then the user opens his Google Earth to view the KML file through network link. Then the user changes the visibility of some of the objects. When the server gets the request from the Flex client, it simply generates a diff KML according to the change against the objects in memory.
Now my question is: how do I store these 10000+ objects in memory on the server side? The tutorials I read about hibernate are all about keeping the objects persistent with the DB and write the changes back into the DB. But the "visibility" property is not part of its properties in the DB. It is only a property associated with the user session. I don't see how this can be achieved.
Any suggestion would be appreciated.