I'm not sure. This sounds very strange. Are there any other details you can provide?
No other relevant details I can think of so far - it only happens when I call "createMessage()" (from the servlet, to broadcast something), and doesn't happen otherwise. I'm using an ordinary servlet with GWT.
Does "createMessage()" launch any asynchronous stuff?
No, there's no asynchronous behaviour in MessageBuilder.createMessage().
If we could see a stack trace of one or more rogue calls to your custom object's methods, we could probably pinpoint the issue for you.
The simplest way to obtain a stack trace would be to add:
to the methods you don't believe the framework should be calling into. You will find the stack traces in the server log.
Alternatively, you could run your app in a debugger and set a breakpoint in your method. Most debuggers (i.e. eclipse) let you copy a stack trace just by selecting a thread and pressing Ctrl-C.
We look forward to hearing back from you on this.
This might be linked to my other issue of GWT-RPC creating a new servlet instance, because when I remove GWT-RPC, I can't seem to observe the behaviour any longer, but I'm not 100% sure it's gone. So if I could get GWT-RPC and Errai to use the same servlet instance, perhaps this problem will be gone.