使用 Java EE 实现聊天应用程序 [英] Implementing chat application with Java EE

查看:28
本文介绍了使用 Java EE 实现聊天应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Java EE 框架 EJB 3 开发了我的 Web 应用程序,在前面使用 JSF.现在我计划将聊天工具添加到我的 Web 应用程序中.所有在线用户都可以互相聊天.

I have developed my web application by using Java EE framework EJB 3, at front using JSF. Now I plan to add chat tool to my web application. All online users can chat with each other.

能否请您指导我应该使用哪个工具将其与 Java EE 集成来开发我的聊天应用程序?如果您提供代码或任何链接,我也将不胜感激.

Can you please guide me which tool I should use to Integrate it with Java EE to develop my chat application? I also appreciate if you provide code or any link.

推荐答案

1- 您必须安装预先开发的聊天服务器.有很多可用的解决方案,我建议您选择 Ejabberd(http://www.ejabberd.im/).它是一个使用 Erlang 实现的聊天服务器,被认为是一个高度可扩展的服务器.和facebook聊天服务器一样,注意facebook一开始只用一台服务器来处理它在全球的所有聊天流量.

1- You have to install a pre developed Chat server. There is many available solutions I advice you to choose Ejabberd ( http://www.ejabberd.im/ ). It's a chat server implemented using Erlang and is considered as a highly scalable server. It's the same as facebook chat server, note that facebook used at the beginning only one server to handle all its chat traffic all over the world.

2- 您必须集成将与聊天服务器通信的 js 聊天客户端.还有一个很酷的开源解决方案,称为 ijab ( http://code.google.com/p/ijab/).您只需将其配置为与您的服务器连接即可.

2- You have to integrate a js chat client that will communicate with the chat server. There is also a cool open source solution for that called ijab ( http://code.google.com/p/ijab/ ). You have just to configure it to connect with your server.

3- 要添加好友和管理用户之间的交互,您可以使用 java jabber 库,并且有很多.该库将用于连接到 ejabberd 服务器.您可以选择其中一种 Java 客户端,但有很多.

3- To add friends and manage interactions between users, you can use a java jabber library and there are many. This library will be used to connect to ejabberd server. You can choose one of the java clients but there are many.

聊天的配置会遇到很多问题,不要小看

You'll encounter many problems in the configuration of chat so don't under estimate it

这篇关于使用 Java EE 实现聊天应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆