Package org.fcrepo.server.journal

Examples of org.fcrepo.server.journal.JournalException


                                                           filename,
                                                           getCurrentDate()));
            currentSize = 0;
            state = FILE_OPEN;
        } catch (ServerException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here


    private void reportNonCrucialExceptions(Map<String, JournalException> nonCrucialExceptions) {
        if (nonCrucialExceptions.isEmpty()) {
            return;
        }
        for (String transportName : nonCrucialExceptions.keySet()) {
            JournalException e = nonCrucialExceptions.get(transportName);
            logger.error("Exception thrown from non-crucial Journal Transport: '"
                    + transportName + "'", e);
        }
    }
View Full Code Here

            throws JournalException {
        if (!crucialExceptions.isEmpty()) {
            JournalOperatingMode.setMode(JournalOperatingMode.READ_ONLY);
        }
        for (String transportName : crucialExceptions.keySet()) {
            JournalException e = crucialExceptions.get(transportName);
            logger.error("Exception thrown from crucial Journal Transport: '"
                    + transportName + "'", e);
        }
    }
View Full Code Here

        String nameString = serverName + "/" + serviceName;

        try {
            receiver = (RmiJournalReceiverInterface) Naming.lookup(nameString);
        } catch (MalformedURLException e) {
            throw new JournalException("Problem finding RMI registry", e);
        } catch (RemoteException e) {
            throw new JournalException("Problem contacting RMI registry", e);
        } catch (NotBoundException e) {
            throw new JournalException("'" + serviceName
                    + "' not registered at '" + serverName + "'", e);
        }
    }
View Full Code Here

            throws JournalException {
        String host = getRequiredParameter(parameters, PARAMETER_HOST_NAME);
        try {
            InetAddress.getByName(host);
        } catch (UnknownHostException e) {
            throw new JournalException("Invalid '" + PARAMETER_HOST_NAME
                    + "' parameter: " + host, e);
        }
        return host;
    }
View Full Code Here

            String port = parameters.get(PARAMETER_PORT_NUMBER);
            try {
                Integer.parseInt(port);
                return port;
            } catch (NumberFormatException e) {
                throw new JournalException("Invalid '" + PARAMETER_PORT_NUMBER
                        + "' parameter: " + port, e);
            }
        } else {
            return String.valueOf(DEFAULT_PORT_NUMBER);
        }
View Full Code Here

        if (parameters.containsKey(PARAMETER_BUFFER_SIZE)) {
            String size = parameters.get(PARAMETER_BUFFER_SIZE);
            try {
                return Integer.parseInt(size);
            } catch (NumberFormatException e) {
                throw new JournalException("Invalid '" + PARAMETER_BUFFER_SIZE
                        + "' parameter: " + size, e);
            }
        } else {
            return DEFAULT_BUFFER_SIZE;
        }
View Full Code Here

    private String getRequiredParameter(Map<String, String> parameters,
                                        String parameter)
            throws JournalException {
        if (!parameters.containsKey(parameter)) {
            throw new JournalException("RmiTransport requires '" + parameter
                    + "' parameter.");
        }
        return parameters.get(parameter);
    }
View Full Code Here

            parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate);

            super.setState(State.FILE_OPEN);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (FactoryConfigurationError e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

             * we need to close the rmi manually just in case.
             */
            try {
                writer.close();
            } catch (IOException e) {
                throw new JournalException(e);
            }
            super.setState(State.FILE_CLOSED);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.fcrepo.server.journal.JournalException

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.