openfire

openfire BOSH 内存泄露

牧云@^-^@ 提交于 2019-12-01 21:21:04
在解决openfire BOSH的一个bug中,偶然发现openfire BOSH有内存泄露的情况。 先提供一个jmap命令来跟踪内存泄露: jmap -histo:live $OPID | grep HttpSession $OPID是openfire的进程号。 HttpSession是openfire BOSH重要的数据结构和逻辑处理模块。 这里不介绍openfire BOSH的具体逻辑。只会简单的说明一下几个对象之间的关系: 1) 当一个client连接到openfire BOSH接口后,就会有一个HttpSession来负责处理所有和这个client之间的消息交互。 2) 一个HttpSession包含一个HttpConnection队列。client和server之间的每一个交互对应一个HttpConnection。 3)server维护了一个全局的map来保存所有的HttpSession。 当client因为某种原因断开和BOSH的连接,发现和这个client相关的HttpConnection/HttpSession并没有被释放。 原因是什么那? 最直接的原因是当HttpSession中断后,server并没有把这个session从map删除掉。 为什么没有被删除掉? 原因是server在清理这个HttpSession之前,抛异常了,导致清理Session工作没有被执行

How to get Java 32bit in Mac OS X Mavericks

纵饮孤独 提交于 2019-12-01 21:14:42
I'm trying to set up an Openfire XMPP server on my MAC, however the problem is that I needed to upgrade to Maverick for Titanium and once you upgrade to Maverick Java updates to a 64bit rather than the 32bit that is needed for Openfire. How can I get the Java 32bit again? musclez This Should help you on understanding how to run a 32-Bit java environment with the -d32 switch. However, the most recent version of Openfire should be 64bit compatible, found here . 来源: https://stackoverflow.com/questions/21865512/how-to-get-java-32bit-in-mac-os-x-mavericks

Smack on Android, getting error code=“404” remote-server-not-found while sending packets/message between two users via local Openfire server

♀尐吖头ヾ 提交于 2019-12-01 18:31:38
I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found here But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed. 03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): <message id="t0tgA-5" to="justestingchat2" type="chat"><body>hi</body></message> 03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV (1155246128): <message id="t0tgA-5" to="justestingchat@admin-pc/Smack" from="justestingchat2" type=

How to know Typing Status in XMPP openfire using Smack

六眼飞鱼酱① 提交于 2019-12-01 16:55:57
I am developing chat application by using Openfire XMPP server. I can text chat between two user. But i want to know Typing status when some one is typing message. So i created a class :- public class typingStatus implements ChatStateListener { @Override public void processMessage(Chat arg0, Message arg1) { // TODO Auto-generated method stub } @Override public void stateChanged(Chat arg0, ChatState arg1) { // TODO Auto-generated method stub System.out.println(arg0.getParticipant() + " is " + arg1.name()); } } But i am confuse so that How will it work? I know that i need a packet where i can it

While fetching Chat History I am Not getting Both user History from Openfire

╄→尐↘猪︶ㄣ 提交于 2019-12-01 15:42:07
I fetched History from openfire by installing open fire plugin in the open fire and tried this code. let iq1 = DDXMLElement(name: "iq") iq1.addAttribute(withName: "type", stringValue: "get") iq1.addAttribute(withName: "id", stringValue: "0") let retrieve = DDXMLElement(name: "retrieve", xmlns: "urn:xmpp:archive") retrieve?.addAttribute(withName: "with", stringValue: "raman@ip-172-31-53-77.ec2.internal") let set = DDXMLElement(name: "set", xmlns: "http://jabber.org/protocol/rsm") let max = DDXMLElement(name: "max", stringValue: "50") iq1.addChild(retrieve!) retrieve?.addChild(set!) set?

How to know Typing Status in XMPP openfire using Smack

时间秒杀一切 提交于 2019-12-01 14:40:00
问题 I am developing chat application by using Openfire XMPP server. I can text chat between two user. But i want to know Typing status when some one is typing message. So i created a class :- public class typingStatus implements ChatStateListener { @Override public void processMessage(Chat arg0, Message arg1) { // TODO Auto-generated method stub } @Override public void stateChanged(Chat arg0, ChatState arg1) { // TODO Auto-generated method stub System.out.println(arg0.getParticipant() + " is " +

While fetching Chat History I am Not getting Both user History from Openfire

亡梦爱人 提交于 2019-12-01 14:34:09
问题 I fetched History from openfire by installing open fire plugin in the open fire and tried this code. let iq1 = DDXMLElement(name: "iq") iq1.addAttribute(withName: "type", stringValue: "get") iq1.addAttribute(withName: "id", stringValue: "0") let retrieve = DDXMLElement(name: "retrieve", xmlns: "urn:xmpp:archive") retrieve?.addAttribute(withName: "with", stringValue: "raman@ip-172-31-53-77.ec2.internal") let set = DDXMLElement(name: "set", xmlns: "http://jabber.org/protocol/rsm") let max =

Openfire+Spark+Fastpath在线客服系统开发

感情迁移 提交于 2019-12-01 13:22:53
总结如下 : 安装Openfire&Spark,Openfire服务器端,Spark为客户端; Openfire需要安装Fastpath插件,并将webchat部署到服务器; Fastpath分为服务端和Web客户端,服务端作为Openfire插件和Openfire集成,Web客户端需要单独的部署; Openfire 需要创建组,加入用户,且用户登录后,需要连接到该组; 页面嵌入客户端: <script language="JavaScript" type="text/javascript" src="http://yuming/webchat/jivelive.jsp"></script> <script> showChatButton('dengs@workgroup.域名'); </script> 需要注意 : 服务端需要开放5222端口,不然spark连接不上。 来源: oschina 链接: https://my.oschina.net/u/560530/blog/285999

使用openfire,spark,fastpath webchat搭建在线咨询服务详细图文解说

邮差的信 提交于 2019-12-01 13:22:43
这几天试用了下openfire相关应用,搭建一个简单的在线咨询服务,有点类似阿里旺旺,可以web页面在线咨询,也可以加为好友在pc客户端中咨询 使用场景:企业业务咨询 1.在官网http://www.igniterealtime.org/index.jsp,下载openfire,spark 2.安装spark.exe,解压openfire.zip 3.执行\openfire_3_9_3\openfire\bin\下的openfire.exe,点击launch admin进入管理员配置界面 4.配置语言、数据库、管理员账号密码等信息, 5.在插件里找到fastpath webchat,Fastpath Service添加下 可以在openfire_3_9_3\openfire\plugins中看到webchat,这里我把webchat.war放到tomcat中运行 重新启动openfire服务可以看到fastpath service 已启动,这里的域名默认是计算机名 6.测试spark,分别注册test1和test2账号 分别登录给对方留言 成功 7.启动tomcat,访问http://localhost:8080/webchat/ 配置openfire服务 配置成功可以看到图片显示为live help offline图片 Fastpath

XMPP学习笔记-LESSON-002:ServerStarter.java

烈酒焚心 提交于 2019-12-01 13:21:18
这个类非常简单,定义了2个变量: DEFAULT_LIB_DIR 默认的系统包路径,值../lib,可以看出这里的root是$openfireHome/bin,那么../lib,就是$openfireHome/lib目录,这里存放着用到的jar,或者jar.pack(pack?啥东西,一会再说) DEFAULT_ADMIN_LIB_DIR 这是默认的插件,即后台管理,他是一个webapp程序,jsp的,web服务器使用jetty,关于插件,以后会详细介绍 ok,到此,我们来看,openfire如何启动。 main方法只有一句代码: new ServerStarter().start(); 读代码无聊么,其实挺有乐趣,代码是最好的学习资料,个人认为,:). 看start(). String libDirString = System.getProperty("openfire.lib.dir"); 这个干吗呢?就是代替上面的DEFAULT_LIB_DIR ,意思如果你指定(或配置)了这个值,那么就以这个变量的值为准。 同理还有, System.getProperty("openfireHome"); 这个指定openfire的主目录位置。 下一步,就是读取lib以及插件的打包文件,解压pack,关注unpackArchives方法。 最后,通过ClassLoader,载入到环境变量里