Mantis - Resin
Viewing Issue Advanced Details
5469 minor always 06-19-13 17:01 07-01-13 14:29
rickHigh  
ferg  
normal  
closed  
fixed  
none    
none 7.0.0  
0005469: Resin 7 Writing and then trying to read what you wrote
I have service code that looks like this:

    public void save() {
        System.out.println("SAVE CALLED");

        System.out.printf("write tasks %s \n", manager.tasks());

        store.store("tasks", manager.tasks());

        System.out.printf("write owners %s \n", manager.owners());

        store.store("ownerToTask", manager.owners());
        System.out.println("SAVE DONE");

    }

Based on the Resin log this is getting called.

I have read code that looks like this:

public void read() {
        System.out.println("READ CALLED");

        MakaiFuture<Object> future = new MakaiFuture<>();

        store.load("tasks", future); ///////// LOOK HERE

        Set<Task> tasks = (Set<Task>) future.get();
        System.out.printf("read tasks %s \n", tasks);

        store.load("ownerToTask", future); ///////// LOOK HERE

        Map<TaskOwner, Set<Task>> owners = (Map<TaskOwner, Set<Task>>) future.get();
        System.out.printf("read owners %s \n", owners);


    }


Here are the logs:
SAVE CALLED

write tasks [Task{timestamp=1371683602658, objectId='task2-8654663153036335188-1371683602658127000-1', name='task2', description='NULL', owner=Group{people=[], ... SNIP

write owners {}

SAVE DONE


READ CALLED

read tasks null

read owners {}

tasks comes back null. I wrote a Set, but I got nothing. This could be a serialization issue but I would expect an error message.

there is no indication in the log why saving owners worked but reading did not.

Notes
(0006298)
ferg   
07-01-13 14:29   
makai/7042