📄 jxtmain.java
字号:
package com.casin.biz;
import org.apache.log4j.*;
import java.io.*;
import java.net.*;
import java.util.*;
import com.ekun.common.db.DBConfigure;
import com.ekun.common.db.DBManager;
import com.ekun.common.sms.*;
import com.ekun.biz.sms.SmsMsgHandler;
import com.ekun.biz.sms.MtCache;
import com.ekun.biz.sms.MoCache;
/**
* <p>Title: </p>
* 家校通系统的主入口类
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author ekun
* @version 1.0
*/
public class JxtMain
{
private CmppLinker cmppLinker = null;
private static void showHint()
{
System.out.println(
"*---------------------------------------------------------*");
System.out.println(
"* 莆田移动短信平台 *");
System.out.println(
"* V1.0 *");
System.out.println(
"*---------------------------------------------------------*");
System.out.println("<" + new java.util.Date() + ">Starting Server...");
}
private void initLog() throws Exception
{
//初始化日志
System.out.println("Init log....");
Properties sysProp = new Properties();
sysProp.load(this.getClass().getResourceAsStream("/config/log4j.properties"));
PropertyConfigurator.configure(sysProp);
System.out.println("log ok!");
}
public JxtMain()
{
showHint();
try
{
initLog();
}
catch(Exception ex)
{
System.out.println("读取日志配置出错!");
//return ;
}
DBConfigure.getInstance().loadConfig("config/db.ini");
DBConfigure.getInstance().setJDBCDriver("com.mysql.jdbc.Driver");
DBConfigure.getInstance().setDevModal(true);
DBConfigure.getInstance().setUseDBPool(true);
DBConfigure.getInstance().setTrace(0);
DBConfigure.getInstance().setDumpinfo(0);
SmsMsgHandler smsProc = new SmsMsgHandler();
CmppLinker cmppLinker = CmppLinker.getInstance();
cmppLinker.setIniFileName("config/cmpp.ini");
cmppLinker.setProcessor(smsProc);
cmppLinker.setSocketTimeOut(5 * 1000);
cmppLinker.reOpen();
OutSendTask cmppTask = new OutSendTask(0);
//启动MT写库线程
new Thread(MtCache.getInstance(), "MtCache").start();
//启动CMPP MT下发扫描线程
new Thread(cmppTask, "CmppOutSendTask").start();
}
public static void main(String[] args)
{
JxtMain jxtmain = new JxtMain();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -