con = getConnection();
con = JDBCUtil.getDBConnection(JNDINames.DATASOURCE);
    public Collection isRevoked(Admin admin, String issuerDN, Collection sernos) {        if (log.isDebugEnabled()) {            debug(">isRevoked(), dn:" + issuerDN + ", no of sernos=" + sernos.size());        }        Connection con = null;        PreparedStatement ps = null;        ResultSet result = null;        ArrayList vect = null;        if (null == admin                || null == issuerDN || issuerDN.length() <= 0                || null == sernos) {            throw new IllegalArgumentException();        }        if (sernos.isEmpty()) {            return new ArrayList();        }        // First make a DN in our well-known format        String dn = CertTools.stringToBCDNString(issuerDN);        try {            final StringBuffer sb = new StringBuffer();            /*             * tmeckel:             * why commented out refer to 'findCertificateByIssuerAndSernos'            CollectionUtils.forAllDo(sernos, new Closure() {                                                public void execute(Object input) {                                                    if (null != input) {                                                        sb.append(", ");                                                        sb.append(input.toString());                                                    }                                                }} );            */            {                Iterator iter = sernos.iterator();                while (iter.hasNext()) {                    sb.append(", '");// Make sure this is really a BigInteger passed in as (untrusted param)                    BigInteger serno = (BigInteger) iter.next();                    sb.append(serno.toString());                    sb.append("'");                }            }            /*             * to save the repeating if-statement in the above             * Closure not to add ', ' as the first characters             * in the StringBuffer we remove the two chars here :)             */            sb.delete(0, ", ".length());            con = getConnection();            ps = con.prepareStatement("SELECT DISTINCT serialNumber, revocationDate, revocationReason, status"                    + " FROM CertificateData WHERE"                    + " issuerDN = '" + dn + "'"                    + " AND serialNumber IN (" + sb.toString() + ")");            result = ps.executeQuery();            vect = new ArrayList();            while (result.next()) {                RevokedCertInfo info = new RevokedCertInfo(new BigInteger(result.getBytes(1)), new Date(result.getLong(2)), result.getInt(3));                // Backwards compatibility, handle databases that did not have NOT_REVOKED                if (result.getInt(4) != CertificateDataBean.CERT_REVOKED) {                    info.setReason(RevokedCertInfo.NOT_REVOKED);                }                vect.add(info);            }        } catch (Exception e) {            error("Unable to load revoked certificates for issuer '"                    + issuerDN                    + "'"                    , e);            throw new EJBException(e);        } finally {            JDBCUtil.close(con, ps, result);        }        debug("<isRevoked()");        return vect;    } // isRevoked