InitialContext jndicontext = new InitialContext();
    public void revokeCA(Admin admin, int caid, int reason)  throws CADoesntExistsException, AuthorizationDeniedException{        // check authorization		try{			getAuthorizationSession().isAuthorizedNoLog(admin,"/super_administrator");		}catch(AuthorizationDeniedException e){			getLogSession().log(admin, caid, LogEntry.MODULE_CA,  new java.util.Date(), null, null, LogEntry.EVENT_ERROR_NOTAUTHORIZEDTORESOURCE,"Administrator isn't authorized to revoke CA",e);			throw new AuthorizationDeniedException("Not authorized to revoke CA with caid = " + caid);		}        // Get CA info.        CADataLocal ca = null;        try{        	ca = this.cadatahome.findByPrimaryKey(new Integer(caid));        }catch(javax.ejb.FinderException fe){           throw new EJBException(fe);        }        String issuerdn = ca.getSubjectDN();        try{			CA cadata = ca.getCA();			// Revoke CA certificate			getCertificateStoreSession().revokeCertificate(admin, cadata.getCACertificate(), cadata.getCRLPublishers(), reason);             // Revoke all certificates generated by CA		    getCertificateStoreSession().revokeAllCertByCA(admin, issuerdn, RevokedCertInfo.REVOKATION_REASON_CACOMPROMISE);			InitialContext jndicontext = new InitialContext();            getCRLCreateSession().run(admin, issuerdn);			cadata.setRevokationReason(reason);			cadata.setRevokationDate(new Date());			cadata.setStatus(SecConst.CA_REVOKED);			ca.setStatus(SecConst.CA_REVOKED);			ca.setCA(cadata);        }catch(Exception e){		   getLogSession().log(admin, caid, LogEntry.MODULE_CA,  new java.util.Date(), null, null, LogEntry.EVENT_ERROR_CAREVOKED,"An error occured when revoking  CA " + ca.getName(),e);           throw new EJBException(e);        }		getLogSession().log(admin, caid, LogEntry.MODULE_CA,  new java.util.Date(), null, null, LogEntry.EVENT_INFO_CAREVOKED,"CA " + ca.getName() + " revoked sucessfully, reason: " + reason);    } // revokeCA