try {
NNTPConnection con = new NNTPConnection(Application.getInstance().getProperty("nntp.hostname", "localhost"),
Integer.parseInt(Application.getInstance().getProperty("nntp.port", "119")));
String username = Application.getInstance().getProperty("nntp.username");
if(!"".equals(username)) {
if(con.authinfo(username, Application.getInstance().getProperty("nntp.password"))) {
System.out.println(new Date() + ": connected");
availableConnections.push(con);
} else {
System.err.println(new Date() + ": not connected. check username/password");
throw new NntpNotConnectedException();