Package org.ejbca.extra.db

Examples of org.ejbca.extra.db.MessageHome


            scepraks = new RAKeyStore(kspath, kspwd);
           
            String randomAlgorithm = "SHA1PRNG";
            randomSource = SecureRandom.getInstance(randomAlgorithm);
           
            msgHome = new MessageHome(Persistence.createEntityManagerFactory("ScepRAMessageDS"), MessageHome.MESSAGETYPE_SCEPRA, true)//false);

        } catch (Exception e) {
            throw new ServletException(e);
        }
    }
View Full Code Here


   * @return null of the CA did not respond in time
   */
  private ExtRAResponse getResponseFromCA(ISubMessage subMessage) {
    ExtRAResponse extRAResponse = null;
    // Setup a database interaction and store the request
    MessageHome messageHome = new MessageHome(Persistence.createEntityManagerFactory("ExternalRAGUIMessageDS"), MessageHome.MESSAGETYPE_EXTRA, true);
    SubMessages submessages = new SubMessages(extRaCertificate, extRaKey, racaserviceCert);
    submessages.addSubMessage(subMessage);
    String messageId = GUIDGenerator.generateGUID(this);
    messageHome.create(messageId, submessages);
    // Get response from CA
    Message response = waitForResponse(messageHome, messageId);
    if (response != null) {
      log.debug("Got processed message");
      SubMessages subMessages = response.getSubMessages(extRaKey, caCerts, null);
View Full Code Here

      help();
      System.exit(-1); // NOPMD, it's not a JEE app
    }else{
      requestKeyStore = args[ARG_TYPE].equalsIgnoreCase(TYPE_KEYSTORE);
      EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("external-ra-cli");
            msghome = new MessageHome(entityManagerFactory, MessageHome.MESSAGETYPE_EXTRA, true);
      securitylevel = args[ARG_SECURITYLEVEL];
      if(!securitylevel.equalsIgnoreCase(SECURITY_UNSECURED) &&
         !securitylevel.equalsIgnoreCase(SECURITY_SIGNED) &&
         !securitylevel.equalsIgnoreCase(SECURITY_ENCRYPTED) &&
         !securitylevel.equalsIgnoreCase(SECURITY_SIGNEDENCRYPTED)){
View Full Code Here

        entityManagerFactory.close();
      } else {
        log.info("Created new entity manager factory for persistence unit '" + persistenceUnit + "'");
      }
    }
        msgHome = new MessageHome(entityManagerFactories.get(persistenceUnit), MessageHome.MESSAGETYPE_EXTRA, true)// We manage transactions ourself for this DataSource

    try {
      serviceKeyStore = new RAKeyStore(keystorePath, keystorePwd);
    } catch (Exception e) {
      if(encryptionRequired || signatureRequired){
View Full Code Here

TOP

Related Classes of org.ejbca.extra.db.MessageHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.