从Swing应用程序远程连接到GWT服务器

时间:2023-01-19 10:50:38

To put it simple, I've written a JSE Swing app that needs to talk to a GWT server I've written earlier. I absolutely love the way GWT does remoting between it's javascript and server sides and wish I could utilize this mechanism. Has anyone managed to use GWT-RPC this way? Should I just go Restlet instead?

简单来说,我编写了一个JSE Swing应用程序,需要与我之前编写的GWT服务器通信。我非常喜欢GWT在它的javascript和服务器端之间进行远程处理的方式,并希望我可以利用这种机制。有没有人设法以这种方式使用GWT-RPC?我应该去Restlet吗?

1 个解决方案

#1


2  

If you are doing Java-to-Java communication, RMI would be simpler and more expedient. Serializing data to/from some XML or URL-based format doesn't add a lot of value.

如果您正在进行Java到Java的通信,那么RMI会更简单,更方便。将数据序列化为某些XML或基于URL的格式并不会增加很多价值。

With EJB3, it is dead simple to deploy remote objects and to call them. You can then turn those EJBs into web services if you need to later, but for Java-to-Java, I can't think of a good reason to not use some sort of RMI-based communication.

使用EJB3,部署远程对象并调用它们非常简单。如果您以后需要,可以将这些EJB转换为Web服务,但对于Java-to-Java,我想不出使用某种基于RMI的通信的充分理由。

#1


2  

If you are doing Java-to-Java communication, RMI would be simpler and more expedient. Serializing data to/from some XML or URL-based format doesn't add a lot of value.

如果您正在进行Java到Java的通信,那么RMI会更简单,更方便。将数据序列化为某些XML或基于URL的格式并不会增加很多价值。

With EJB3, it is dead simple to deploy remote objects and to call them. You can then turn those EJBs into web services if you need to later, but for Java-to-Java, I can't think of a good reason to not use some sort of RMI-based communication.

使用EJB3,部署远程对象并调用它们非常简单。如果您以后需要,可以将这些EJB转换为Web服务,但对于Java-to-Java,我想不出使用某种基于RMI的通信的充分理由。