public class main_start
{ /**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
ami_billing billing=new ami_billing();
Thread t=new Thread(billing);
t.start(); }}billing的run方法里运行一个死循球
while(true)
这个程序有没有问题?
{ /**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
ami_billing billing=new ami_billing();
Thread t=new Thread(billing);
t.start(); }}billing的run方法里运行一个死循球
while(true)
这个程序有没有问题?
{
mylog.info("update_caller");
Connection mysql_conn= mysqlConnect();
String sql="update web_callsinfo set callfrom='"+caller+"',callto='"+callee+"'";
sql+=" where sessionid='"+uniqueid+"'";
Statement stmt=null;
try
{
stmt=mysql_conn.createStatement();
stmt.executeUpdate(sql);
stmt.close();
mysql_conn.close();
mylog.info("update_caller end");
}
catch(Exception ex)
{
mylog.warn("371"+ex.getMessage());
}
}日志
16:46:24:INFO [Thread-1] lang.Class (update_caller:357) - update_caller
16:46:35:INFO [Thread-1] lang.Class (update_caller:368) - update_caller end
这段代码从开始到结束运行了11秒这个是什么问题?