certificateStore.storeCertificate(admin, cacert, "SYSTEMCA", fingerprint, CertificateData.CERT_ACTIVE, certtype);
certificateStore.storeCertificate(admin, cacert, "SYSTEMCA", fingerprint, CertificateDataBean.CERT_ACTIVE, certtype);
    public void publishCACertificate(Admin admin, Collection certificatechain, Collection usedpublishers, int certtype) {        try {            ICertificateStoreSessionLocal certificateStore = storeHome.create();            Iterator certificates = certificatechain.iterator();            while (certificates.hasNext()) {                Certificate cacert = (Certificate) certificates.next();                //     Store CA certificate in the database                String fingerprint = CertTools.getFingerprintAsString((X509Certificate) cacert);                if (certificateStore.findCertificateByFingerprint(admin, fingerprint) == null) {                    certificateStore.storeCertificate(admin, cacert, "SYSTEMCA", fingerprint, CertificateData.CERT_ACTIVE, certtype);                }                // Store cert in ca cert publishers.                IPublisherSessionLocal pub = publishHome.create();                if (usedpublishers != null)                    pub.storeCertificate(admin, usedpublishers, cacert, fingerprint, null, fingerprint, CertificateData.CERT_ACTIVE, certtype, null);            }        } catch (javax.ejb.CreateException ce) {            throw new EJBException(ce);        }    }