Please find the attached small java test which gives you the different behaviour. Please find the following mail thread which says the embedded mode's behaviour is correct.
To run the test in the embedded mode
java TestCursor embedded
in n/w server ( have to start the server seperately)
java TestCursor NetworkServer