androidpn的一些基本常识:
ANDROIDPN_HOME=C:\android-push\androidpn-server-0.5.0
启动androidpn服务端:
%ANDROID_HOME%/bin/run.bat
androidpn的数据库日志:
%ANDROID_HOME%/bin/db/androidpn.log
androidpn的数据库配置:
%ANDROID_HOME%/bin/db/androidpn.properties
androidpn的数据库表结构脚本:
%ANDROID_HOME%/bin/db/androidpn.script
androidpn的服务端应用数据库配置:
%ANDROID_HOME%/conf/jdbc.properties
androidpn的服务端应用xmpp配置:
%ANDROID_HOME%/conf/config.properties
androidpn的服务端应用应用hibernate缓存配置:
%ANDROID_HOME%/conf/ehcache.xml
androidpn的服务端应用日志配置:
%ANDROID_HOME%/conf/log4j.xml
androidpn的服务端应用spring配置:
%ANDROID_HOME%/conf/spring-config.xml
androidpn的服务端日志:
%ANDROID_HOME%/logs/androidpn.log (记录发送消息xmpp的格式和调用顺序)
如下:
{DEBUG} [2012-07-24 14:40:23,921] <org.apache.mina.core.filterchain.IoFilterEvent> : Firing a MESSAGE_RECEIVED event for session 2
{DEBUG} [2012-07-24 14:40:23,921] <org.apache.mina.filter.codec.ProtocolCodecFilter> : Processing a MESSAGE_RECEIVED for session 2
{DEBUG} [2012-07-24 14:40:23,921] <org.apache.mina.core.filterchain.IoFilterEvent> : Event MESSAGE_RECEIVED has been fired for session 2
{DEBUG} [2012-07-24 14:40:53,968] <org.apache.mina.filter.executor.OrderedThreadPoolExecutor> : Adding event MESSAGE_RECEIVED to session 2
Queue : [MESSAGE_RECEIVED, ]
{DEBUG} [2012-07-24 14:40:53,968] <org.apache.mina.core.filterchain.IoFilterEvent> : Firing a MESSAGE_RECEIVED event for session 2
{DEBUG} [2012-07-24 14:40:53,968] <org.apache.mina.filter.codec.ProtocolCodecFilter> : Processing a MESSAGE_RECEIVED for session 2
{DEBUG} [2012-07-24 14:40:53,968] <org.apache.mina.core.filterchain.IoFilterEvent> : Event MESSAGE_RECEIVED has been fired for session 2
{DEBUG} [2012-07-24 14:41:06,453] <org.androidpn.server.console.controller.NotificationController> : apiKey=1234567890
{DEBUG} [2012-07-24 14:41:06,453] <org.androidpn.server.xmpp.push.NotificationManager> : sendBroadcast()...
{DEBUG} [2012-07-24 14:41:06,453] <org.androidpn.server.xmpp.net.Connection> :
SENT: <iq type="set" id="943-1" to="[email protected]/AndroidpnClient"><notification xmlns="androidpn:iq:notification"><id>fdcbd43b</id><apiKey>1234567890</apiKey><title>Dokdo Island</title><message>Dokdo is a Korean island, the far east of the Korean territory. No doubt! No question! Don't mention it any more!说的法撒旦法</message><uri></uri></notification></iq>
{DEBUG} [2012-07-24 14:41:06,468] <org.apache.mina.filter.executor.OrderedThreadPoolExecutor> : Adding event MESSAGE_SENT to session 2
Queue : [MESSAGE_SENT, ]
备注:
在hibernate的配置中hibernate.cfg.xml配置中:
<!--( validate | update | create | create-drop )-->
<property name="hibernate.hbm2ddl.auto">update</property>
在多次重新运行服务端和客户端之后,可以发现,服务端的脚本中存在有记录客户端id标志的起始值的已经存在的数据信息信息:
在androidpn-server-0.5.0\bin\db\androidpn.script中。
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE APN_USER(ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,CREATED_DATE TIMESTAMP,EMAIL VARCHAR(64),NAME VARCHAR(64),PASSWORD VARCHAR(64),UPDATED_DATE TIMESTAMP,USERNAME VARCHAR(64) NOT NULL,CONSTRAINT SYS_CT_46 UNIQUE(USERNAME))
ALTER TABLE APN_USER ALTER COLUMN ID RESTART WITH 3
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO APN_USER VALUES(1,'2012-07-23 13:07:50.421000000',NULL,NULL,'4c9cd95e3d3d4874b507fdae64e38b41',NULL,'25a67fa989354bca832513d4a3ad4f3d')
INSERT INTO APN_USER VALUES(2,'2012-07-24 14:34:38.953000000',NULL,NULL,'7b8f51468cb441379d0883e1c4707847',NULL,'ea34751c595443c89be07aa17eab76f3')