Sean Flanigan
2010-02-02 08:01:52 UTC
G'day,
I finally got my client and server talking on the same MessageBus, but I
discovered that my message parts were coming through (server->client) as
null. This was a silent failure - what happened to the "glorious
runtime exception"?. Anyway, I eventually found the post on errai-dev
about @ExposeEntity, and the new section in the documentation.
http://www.errai-framework.org/docs/html/en/#d0e362
The documentation says that classes annotated with @ExposeEntity will
have stubs generated for them, but this doesn't seem to be happening.
(NB: The docs & example should mention the need for Serializable; my
objects were originally designed for GWT-RPC, and implemented
IsSerializable.)
I've annotated both the concrete classes and the interface they
implement, but it doesn't look like the stub generator is even being
called. If it were, I think I would see the INFO logging in the JBoss
console at startup. Is there something else I need to do for these
stubs to be generated?
Do the stubs even work on the server, or are they client-side only?
Tracing the code, it seems like the ServerMessageBus calls JSONEncoder,
and I can't see where the stubs could come into it, even if they were
generated. (But perhaps I just don't understand the code well enough.)
JSONEncoder seems to be fairly happy as long as my objects implement
Serializable *and* provide getter methods for everything, but it doesn't
seem to handle Enums...
Hmm. I don't suppose anyone knows a way I can just ask GWT-RPC to
serialize my objects its way, and then just stick the result into a
message part?
Regards
Sean.
--
Sean Flanigan
Senior Software Engineer
Engineering - Internationalisation
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/errai-users/attachments/20100202/597d42a1/attachment.bin
I finally got my client and server talking on the same MessageBus, but I
discovered that my message parts were coming through (server->client) as
null. This was a silent failure - what happened to the "glorious
runtime exception"?. Anyway, I eventually found the post on errai-dev
about @ExposeEntity, and the new section in the documentation.
http://www.errai-framework.org/docs/html/en/#d0e362
The documentation says that classes annotated with @ExposeEntity will
have stubs generated for them, but this doesn't seem to be happening.
(NB: The docs & example should mention the need for Serializable; my
objects were originally designed for GWT-RPC, and implemented
IsSerializable.)
I've annotated both the concrete classes and the interface they
implement, but it doesn't look like the stub generator is even being
called. If it were, I think I would see the INFO logging in the JBoss
console at startup. Is there something else I need to do for these
stubs to be generated?
Do the stubs even work on the server, or are they client-side only?
Tracing the code, it seems like the ServerMessageBus calls JSONEncoder,
and I can't see where the stubs could come into it, even if they were
generated. (But perhaps I just don't understand the code well enough.)
JSONEncoder seems to be fairly happy as long as my objects implement
Serializable *and* provide getter methods for everything, but it doesn't
seem to handle Enums...
Hmm. I don't suppose anyone knows a way I can just ask GWT-RPC to
serialize my objects its way, and then just stick the result into a
message part?
Regards
Sean.
--
Sean Flanigan
Senior Software Engineer
Engineering - Internationalisation
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/errai-users/attachments/20100202/597d42a1/attachment.bin