void load() throws StartException {
        FileInputStream fis = null;
        try {
            KeyStore loadedKeystore = KeyStore.getInstance(provider);

            if (new File(path).exists()) {
                fis = new FileInputStream(path);
                loadedKeystore.load(fis, keystorePassword);
            } else if (isKeyStore) {
                throw DomainManagementLogger.ROOT_LOGGER.keyStoreNotFound(path);
            } else {
                loadedKeystore.load(null);
            }

            if (isKeyStore) {
                assertContainsKey(loadedKeystore);
            }

            if (alias == null) {
                this.setKeyStore(loadedKeystore);
            } else {
                KeyStore newKeystore = KeyStore.getInstance(provider);
                newKeystore.load(null);

                KeyStore.ProtectionParameter passParam = new KeyStore.PasswordProtection(keyPassword == null ? keystorePassword
                        : keyPassword);

                if (loadedKeystore.containsAlias(alias)) {
                    if (loadedKeystore.isKeyEntry(alias)) {
                        KeyStore.Entry entry = loadedKeystore.getEntry(this.alias, passParam);
                        newKeystore.setEntry(alias, entry, passParam);
                    } else {
                        throw DomainManagementLogger.ROOT_LOGGER.aliasNotKey(alias, validAliasList(loadedKeystore));
                    }
                } else {
                    throw DomainManagementLogger.ROOT_LOGGER.aliasNotFound(alias, validAliasList(loadedKeystore));
                }

                this.setKeyStore(newKeystore);
            }
            this.lastModificationTime = new File(path).lastModified();
        } catch (KeyStoreException e) {
            throw DomainManagementLogger.ROOT_LOGGER.unableToStart(e);
        } catch (NoSuchAlgorithmException e) {
            throw DomainManagementLogger.ROOT_LOGGER.unableToStart(e);
        } catch (CertificateException e) {
            throw DomainManagementLogger.ROOT_LOGGER.unableToStart(e);
        } catch (IOException e) {
            throw DomainManagementLogger.ROOT_LOGGER.unableToStart(e);
        } catch (UnrecoverableEntryException e) {
            throw DomainManagementLogger.ROOT_LOGGER.unableToStart(e);
        } finally {
            safeClose(fis);
        }
    }
void load ( ) throws StartException { FileInputStream fis = null ; try { KeyStore loadedKeystore = KeyStore . getInstance ( provider ) ; if ( new File ( path ) . exists ( ) ) { fis = new FileInputStream ( path ) ; loadedKeystore . load ( fis , keystorePassword ) ; } else if ( isKeyStore ) { throw DomainManagementLogger . ROOT_LOGGER . keyStoreNotFound ( path ) ; } else { loadedKeystore . load ( null ) ; } if ( isKeyStore ) { assertContainsKey ( loadedKeystore ) ; } if ( alias == null ) { this . setKeyStore ( loadedKeystore ) ; } else { KeyStore newKeystore = KeyStore . getInstance ( provider ) ; newKeystore . load ( null ) ; KeyStore . ProtectionParameter passParam = new KeyStore . PasswordProtection ( keyPassword == null ? keystorePassword : keyPassword ) ; if ( loadedKeystore . containsAlias ( alias ) ) { if ( loadedKeystore . isKeyEntry ( alias ) ) { KeyStore . Entry entry = loadedKeystore . getEntry ( this . alias , passParam ) ; newKeystore . setEntry ( alias , entry , passParam ) ; } else { throw DomainManagementLogger . ROOT_LOGGER . aliasNotKey ( alias , validAliasList ( loadedKeystore ) ) ; } } else { throw DomainManagementLogger . ROOT_LOGGER . aliasNotFound ( alias , validAliasList ( loadedKeystore ) ) ; } this . setKeyStore ( newKeystore ) ; } this . lastModificationTime = new File ( path ) . lastModified ( ) ; } catch ( KeyStoreException e ) { throw DomainManagementLogger . ROOT_LOGGER . unableToStart ( e ) ; } catch ( NoSuchAlgorithmException e ) { throw DomainManagementLogger . ROOT_LOGGER . unableToStart ( e ) ; } catch ( CertificateException e ) { throw DomainManagementLogger . ROOT_LOGGER . unableToStart ( e ) ; } catch ( IOException e ) { throw DomainManagementLogger . ROOT_LOGGER . unableToStart ( e ) ; } catch ( UnrecoverableEntryException e ) { throw DomainManagementLogger . ROOT_LOGGER . unableToStart ( e ) ; } finally { safeClose ( fis ) ; } }
Load the keystore file and cache the keystore. if the keystore file has changed
call load() again for updating the keystore
@throws StartException