views:

33

answers:

1

Hi All.

I recently created a web application with GWT. Then re-used most of the code to create a Swing version of the application that accesses a local database in offline mode. I am now implementing the 'online' mode of the application and want to access the same data as my GWT application.

Any ideas? Considered connecting directly to the MySQL server via SSL, but that's not working and doesn't seem as scalable. Should I use REST?

Any suggestions would be helpful.

A: 

To solve this problem in the past, we've used Jersey to create REST Web services which returns protocol buffers. The Swing app would then interact with the protocol buffers. The GWT app would ask for content type 'json' and receive protostuff objects in return. It worked quite well. That way, both apps can communicate with the server in the exact way.

Edit:

To allow your swing app to communicate with GWT-RPC, look at this blog article.

Jay Askren
Sorry 'bout the late response.... Thank you.
kirtcathey
Yes, using GWT-RPC....
kirtcathey