« Return to Thread: store data in a global way (see tapestry:applicationScope)

Re: store data in a global way (see tapestry:applicationScope)

by alebu :: Rate this Message:

Reply to Author | View in Thread

There is also singleton service model, which, as I understand, can help
you in solving your problem.
Eckenfellner Klaus wrote:

> hi everybody!
>
> i want to use hivemind for my own application, because SOA rocks. but
> now i have a problem. i want to store data(Map<String,Object>) in a
> global way. so that there is no difference which thread call the service.
>
> i know this functionality from tapestry because there is also possible
> to store objects in an application scope.
>
> i know that there is model="threaded / pooled" but that doesn't fix my
> problem.
>
> here some facts about my application:
> - first doing some init work (reading config, init log ....)
> - export some services to a rmi registry
> - waiting for connections,...
>
> i decided to take the following approach to store data:
> INTERFACE storeService:
> boolean exists(String name);
> Object get(String name);
> void store(String name, Object object);
>
> IMPL:
> Map<String,Object> map = new HashMap<String,Object>
> ....  following parts should be clear... map.get() map.xxx
>
> HIVEMODULE:
> in the hivemodule the storeService, which stores data in the hashmap,
> is constructed with model="pooled".
>
> BUT ....
>
> when i get some rmi call my rmi service(which has a reference to
> storeService) has no access to my stored data.
>
> can anyone help me?
>
> using hivemind 1.1
>
> PS: my approach is very similar to tapestry applicationScope.
>
>  

 « Return to Thread: store data in a global way (see tapestry:applicationScope)