lizongbo at 618119.com 工作,生活,Android,前端,Linode,Ubuntu,nginx,java,apache,tomcat,Resin,mina,Hessian,XMPP,RPC

2008年04月8日

Openfire 3.5.0正式发布,Openfire Enterprise也将开源

Filed under: Cluster,IM,Openfire,Spark,XMPP,未分类 — 标签:, , , , , — lizongbo @ 12:48

Openfire 3.5.0正式发布,Openfire Enterprise也将开源

openfire 3.5 的 修订日志在: http://www.igniterealtime.org/builds/openfire/docs/latest/changelog.html
相关下载地址:

http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_5_0.zip

http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_3_5_0.zip

Openfire Enterprise下载
http://www.igniterealtime.org/projects/openfire/plugins/enterprise.jar
http://www.igniterealtime.org/projects/openfire/plugins/webchat.war

其它插件下载:

http://www.igniterealtime.org/projects/openfire/plugins/asterisk-im.jar
http://www.igniterealtime.org/projects/openfire/plugins/broadcast.jar
http://www.igniterealtime.org/projects/openfire/plugins/contentFilter.jar
http://www.igniterealtime.org/projects/openfire/plugins/emailListener.jar
http://www.igniterealtime.org/projects/openfire/plugins/gateway.jar
http://www.igniterealtime.org/projects/openfire/plugins/motd.jar
http://www.igniterealtime.org/projects/openfire/plugins/presence.jar
http://www.igniterealtime.org/projects/openfire/plugins/registration.jar
http://www.igniterealtime.org/projects/openfire/plugins/search.jar
http://www.igniterealtime.org/projects/openfire/plugins/sip.jar
http://www.igniterealtime.org/projects/openfire/plugins/subscription.jar
http://www.igniterealtime.org/projects/openfire/plugins/userImportExport.jar
http://www.igniterealtime.org/projects/openfire/plugins/userservice.jar
http://www.igniterealtime.org/projects/openfire/plugins/enterprise.jar

Openfire Enterprise以前是作为商业插件提供的,现在也将变成开源。相关文章:
http://www.igniterealtime.org/community/blogs/ignite/2008/04/07/openfire-is-lookin-hot

http://www.igniterealtime.org/community/blogs/ignite/2008/04/07/openfire-enterprise-is-becoming-open-source

http://www.igniterealtime.org/community/blogs/ignite/2008/04/07/turning-openfire-enterprise-into-an-open-source-product

目前在官方网站尚未看到 Openfire Enterprise的代码 http://svn.igniterealtime.org/svn/repos/

由于Openfire Enterprise是使用了Oracle Coherence来实现集群功能,
而Oracle Coherence是被Oracle收购的Tangosol Coherence,是商业产品。因此Openfire Enterprise的集群功能不会开源。

关于Oracle Coherence,可以参看: http://www.oracle.com/technology/global/cn/products/coherence/index.html

2007年12月12日

体验OpenFire3.4.2的集群功能

Filed under: cache,Java — 标签:, , , , , — lizongbo @ 15:28

体验OpenFire3.4.2的集群功能

曾经因为学习xmpp的时候关注了openfire,那时候还叫WildFire,
曾经照虎画猫用lumaqq写了个qq插件,后来没时间也就没看了.

OpenFire 3.4.2发布了,在3.4开始就支持了集群功能,

changelog在: http://www.igniterealtime.org/builds/openfire/docs/latest/changelog.html

相关下载链接为:

http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3_4_2.zip
http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_src_3_4_2.zip

http://www.igniterealtime.org/downloadServlet?filename=smack/smack_src_3_0_4.zip

http://www.igniterealtime.org/downloadServlet?filename=spark/online/spark_2_5_8_online.exe

http://www.igniterealtime.org/downloadServlet?filename=connectionmanager/connection_manager_src_3_4_2.zip
http://www.igniterealtime.org/downloadServlet?filename=connectionmanager/connection_manager_3_4_2.zip

上面的下载连接不支持断点续传.

http://www.igniterealtime.org/projects/openfire/plugins/asterisk-im.jar
http://www.igniterealtime.org/projects/openfire/plugins/broadcast.jar
http://www.igniterealtime.org/projects/openfire/plugins/contentFilter.jar
http://www.igniterealtime.org/projects/openfire/plugins/sip.jar
http://www.igniterealtime.org/projects/openfire/plugins/gateway.jar
http://www.igniterealtime.org/projects/openfire/plugins/presence.jar
http://www.igniterealtime.org/projects/openfire/plugins/registration.jar
http://www.igniterealtime.org/projects/openfire/plugins/search.jar
http://www.igniterealtime.org/projects/openfire/plugins/subscription.jar
http://www.igniterealtime.org/projects/openfire/plugins/userImportExport.jar
http://www.igniterealtime.org/projects/openfire/plugins/userservice.jar

http://www.igniterealtime.org/projects/openfire/plugins-beta/filetransferdisabler.jar
http://www.igniterealtime.org/projects/openfire/plugins-beta/red5.war
http://www.igniterealtime.org/projects/openfire/plugins-beta/vcard.jar

http://www.igniterealtime.org/projects/openfire/plugins/enterprise.jar
http://www.igniterealtime.org/projects/openfire/plugins/webchat.war

配置openfire的启动参数,比如设置内存,
如果是用openfired.exe启动,则在D:\Java\openfire\bin创建openfired.vmoptions
内容为:
-Xms64m
-Xmx256m

如果是用openfire-service.exe进去启动的,则创建openfire-service.vmoptions.

测试了一下集群功能,openfire clustering特性用的是被Oracle收购的coherence来实现的,授权用的Tangosol Coherence: Application Edition.
tangosol-license.jar中有licensee信息,
coherence的下载地址在:
http://download.oracle.com/otn/java/coherence/coherence-331.zip
来源: http://www.oracle.com/technology/software/products/ias/htdocs/coherence.html

2007年11月20日

用JDBC连接Oracle 10g RAC遇到的问题

Filed under: DbVisualizer,Oracle,数据库 — 标签:, , , , , , , , , — lizongbo @ 08:56

数据库升级为Oracle 10g RAC,原有的连接方式下,出现如下错误:

出错信息:
– Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: “o
rg.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFacto
ry (Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169869568)(ERR=12505)(
ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))))”
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnect
ion(QueryTagSupport.java:276)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag
(QueryTagSupport.java:159)

于是根据网上的资料修改了JDBC的URL,正确jdbc的url为:

jdbc:oracle:thin:@(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.40.103)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.40.104)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = mydb.618119.com) ) )

或者:

jdbc:oracle:thin:@(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = db01.618119.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)
(HOST = db02.618119.com)(PORT = 1521))
(LOAD_BALANCE = yes)
(failover = yes)
(CONNECT_DATA = (SERVER = DEDICATED)
(SERVICE_NAME = mydb.618119.com) ) )

结果过依然存在问题:

偶尔会出现错误:

An error occurred while establishing the connection:
Type: java.sql.SQLException Error Code: 17002
Message:
Io 异常: Connection refused(DESCRIPTION=(ERR=1153)(VSNNUM=169869568)(ERROR_STACK=(ERROR=(CODE=1153)(EMFI=4)(ARGS='(ADDRESS=(PROTOCOL=TCP)(HOST=RAC02)(PORT=1521))’))(ERROR=(CODE=305)(EMFI=1))))

试了将驱动替换为10g的ojdbc14.jar.

然后再在DbVisualizer中试了很多次断开连接和重新链接,都还没出错.
但是在web页面中测试,还是经常出现获取不到数据库连接的情况.

在网上查询了很多资料,仍未能解决这个问题, 不得已,只好换成oci方式连接.
在jdbc客户端所在地服务器中,将TNSNAMES.ORA里本地服务名配置为
mydb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.40.103)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.40.104)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb.618119.com)
)
)

oci方式的jdbc url=”jdbc:oracle:oci:@mydb”;

获取数据库连接正常.

主要参考了以下资料 : http://www.ixdba.net/hbcms/article/97/244.html

http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=123&threadID=44660&messageID=264712

http://article.51edu.com/computer/shujuku/Oracle/200512/42391.html

http://www.dba-oracle.com/art_oramag_rac_taf.htm

http://www.koorka.com/download/free/Oracle_RAC_For_Windows_install.pdf

http://www.koorka.com/download/free/Oracle_RAC_For_Linux_install.pdf

update:

在使用oci模式进行连接时,整个虚拟机内只能有一份oracle的jdbc 驱动,并且所在的机器必须安装了oracle 的client,oracle client必须与驱动版本一致,即,如果是使用10g的jdbc驱动,则必须安装10g的 oracle client,需要Orace client的bin目录需要添加到环境变量的path中,例如:

Path=d:\oracle\product\10.2.0\client_1\bin;D:\Java\apache-ant-1.7.0\bin;D:\J ava\
jdk1.6.0_03\bin;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;D:\Progr
am Files\Microsoft Network Monitor 3\;D:\PROGRA~1\F-Secure\Ssh;

因此在web应用中Oracle jdbc的驱动不能放在WEB-INF/lib目录下,而是要放到 server的lib目录下(例如Tomcat6的D:\Java\apache-tomcat-6.0.14\lib ,Tomcat5的D:\Java\apache-tomcat-5.5.25\common\lib) .

如果出现重复的oracle jdbc驱动文件(或者是多个不同版本的oracle jdbc驱动在一起) ,

则可能出现以下错误信息:

[code]

java.lang.UnsatisfiedLinkError: make_c_state
java.lang.UnsatisfiedLinkError: make_c_state
at oracle.jdbc.oci8.OCIDBAccess.make_c_state(Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)

[/code]

[code]

java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\ocijdbc9.dll
already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1716)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:294)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)

[/code]

udate:

http://lhylj2.spaces.live.com/Blog/cns!7E417A90C3FE44A9!229.entry
这里提到换成 Oracle 9.0.2.4的jdbc驱动可以解决时而连不上的问题,我没有测试过 .

Powered by WordPress