Storing objects in Application

  • Thread starter Thread starter Diego F.
  • Start date Start date
D

Diego F.

I need to store a hash table in memory all the time. I thought about
remoting, having a server application running with the table, then a web
service that communicates with the server and finally the clients (pocket pc
applications). Someone told me about storing the table in application
object, so it is available during all execution. But, where should I store
it? In the web service? I assume that with that I don't need the server
object.

Regards,

Diego F.
 
Diego, you can store it in the AppDomain

look at the AppDomain.SetObject, AppDomain.GetObject functions

hope this helps
 
But in the web service? And does it keep in memory after calling the web
mehtods?

Regards,

Diego F.
 
Well, that's amazing! Now the object is too stored !! I explain:

I declare the object I want to keep in memory and the methods that use the
object static in the DLL where they are declared.

I tested it and it seems to work, as I can get the objects in different
calls. But now, even when the application is closed, it seems that the table
is still in memory. I reopen the application and the objects are in memory
with the values I added in the previous execution.

How do I dispose the object??

Regards,

Diego F.
 
It seems that after some minutes it ends. Can I control when does it finish?
At least I know that it finally ends :-)

Regards,

Diego F.
 
Hi Diego,


I thought about
remoting,
PPC apps does not support remoting.
having a server application running with the table, then a web
service that communicates with the server and finally the clients (pocket pc
applications).

Is this where the data will be used ( the PPC)?
Will the data be shared among the different clients ?
Do the clients needs to use the data updated?

I have a system where the clients running on PPC connect to a windows
service to update the data, then they works with that snapshot of the data
until the next time they sync. with the server when they download the
lastest data.
If this works for you is better, cause otherwise you will need a constant
connection to the server.

Just drop a line if you need more help.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top