con = getConnection();
con = JDBCUtil.getDBConnection(JNDINames.DATASOURCE);
    public Collection findCertificatesByExpireTimeWithLimit(Admin admin, Date expiretime) {        debug(">findCertificatesByExpireTimeWithLimit");        Connection con = null;        PreparedStatement ps = null;        ;        ResultSet result = null;        ArrayList returnval = new ArrayList();        long currentdate = new Date().getTime();        try {            con = getConnection();            ps = con.prepareStatement("SELECT DISTINCT username FROM CertificateData WHERE expireDate>=? AND expireDate<? AND status=?");            ps.setLong(1, currentdate);            ps.setLong(2, expiretime.getTime());            ps.setInt(3, CertificateDataBean.CERT_ACTIVE);            result = ps.executeQuery();            while (result.next() && returnval.size() <= SecConst.MAXIMUM_QUERY_ROWCOUNT + 1) {                if (result.getString(1) != null && !result.getString(1).equals(""))                    returnval.add(result.getString(1));            }            debug("<findCertificatesByExpireTimeWithLimit()");            return returnval;        } catch (Exception e) {            throw new EJBException(e);        } finally {            JDBCUtil.close(con, ps, result);        }    } //findCertificatesByExpireTimeWithLimit