package com.threadpool.test;
public class AccessDBThread implements Runnable{
    private String msg;
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }    
    public AccessDBThread(){
        super();
    }    
    public AccessDBThread(String msg)
    {
        this.msg=msg;
    }
    public void run() {
        // TODO Auto-generated method stub
        System.out.println("Added the message: "+msg+" into the Database");
    }    
}
测试类:package com.threadpool.test;
public class TestDriver {
    ThreadPoolManager tpm = ThreadPoolManager.newinstance();
    
    public void addMsg(String msg)
    {
        tpm.addLogMsg(msg);
    }
    public static void main(String[] args) {
        for(int i=0;i<100;i++)
        {
            new TestDriver().addMsg(Integer.toString(i));
        }
    }
}