Examples of RegistrationException


Examples of com.google.dataconnector.util.RegistrationException

    expect(fileUtil.getFileInputStream(TEST_FILE)).andReturn(fileInputStream);
    expect(fileInputStream.read()).andReturn(2);
    expect(fileInputStream.read()).andReturn(-1);

    registration.sendRegistrationInfo(frameSender);
    expectLastCall().andThrow(new RegistrationException(""));

    fileInputStream.close();
    EasyMock.expectLastCall();

    systemUtil.sleep(localConf.getFileWatcherThreadSleepTimer() * 60 * 1000L);
 
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

   
    public void generateRegistrationPage(String outputFile, Locale locale) throws Exception {
        bundle = getResourceBundle(locale);
        InputStream is = getClass().getClassLoader().getResourceAsStream(TEMPLATE_FILE);
        if (is == null)
            throw new RegistrationException("Template file [" + TEMPLATE_FILE + "] not found");

        List<ServiceTag> serviceTags = rm.getServiceTags();
        StringBuilder productName = new StringBuilder();
        for (ServiceTag tag : serviceTags) {
            if (productName.length() > 0)
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

   
    public void generateRegistrationPage(String outputFile, Locale locale) throws Exception {
        bundle = getResourceBundle(locale);
        InputStream is = getClass().getClassLoader().getResourceAsStream(TEMPLATE_FILE);
        if (is == null)
            throw new RegistrationException("Template file [" + TEMPLATE_FILE + "] not found");

        List<ServiceTag> serviceTags = rm.getServiceTags();
        StringBuilder productName = new StringBuilder();
        for (ServiceTag tag : serviceTags) {
            if (productName.length() > 0)
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

            }
            result = unTransferredTags.size();
            logger.info( result + " service tags successfully transferred to SysNet");
            return result;
        } catch (Exception e) {
            throw new RegistrationException(StringManager.getString("xfmgr.errTransTags"), e);
}
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

             * interrupted for some reason.  So make sure the command process exit
             * was actually detected before trying to interpret the status.
             */
            if ( ! processExitDetected.get()) {
                logger.fine("Command process monitoring thread stopped before the command process, so the command's state is unknown");
                throw new RegistrationException(StringManager.getString("xfmgr.unknownCmdProcResult"));
            }

            /*
             * By checking processExited first, we know that at this point the
             * processExitStatus has meaning.  So go ahead and check it to
             * decide if the process completed successfully or not.
             */
            if (processExitStatus.get() != 0) {
                /*
                 * Build an exception using the error output from the process
                 * and throw it.
                 */
                RegistrationException e =
                    new RegistrationException(StringManager.getString("xfmgr.cmdProcFailed", errorTextFromProcess.toString()));
                throw e;
            }

            logger.fine("Command process seems to have completed successfully");
        }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

         * @param the option to be added
         * @param value the option's value
         */
        private void addRequired(String option, String value) throws RegistrationException {
            if (value == null) {
                throw new RegistrationException(StringManager.getString("xfmgr.reqdValueNull", option));
            }
            command.add(option);
            command.add(formatValue(value));
        }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

            transformer = transformerFactory.newTransformer();
            transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount","4");
            loadOrCreateDocument();
        } catch (Exception e) {
            throw new RegistrationException(e);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

     * to the local repository
     */
    public void add(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st != null) {
            throw new RegistrationException(StringManager.getString("rpmgr.svrTagExists"));
            //throw new RegistrationException("rpmgr.svrTagExists");
        }
        /*
         * Create a new Element in the active document using the specified
         * service tag information.
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

     * to the local repository
     */
    public void remove(ServiceTag serviceTag) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
         throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
         //throw new RegistrationException("rpmgr.noSuchSrvTag");
        }
        registryElement.removeChild(st);
        writeToFile();
    }
View Full Code Here

Examples of com.sun.enterprise.registration.RegistrationException

     * to the local repository
     */
    public void setRegistrationStatus(ServiceTag serviceTag, ServiceTag.RegistrationStatus status) throws RegistrationException {
        Element st = findServiceTag(serviceTag);
        if (st == null) {
            throw new RegistrationException(StringManager.getString("rpmgr.noSuchSrvTag"));
        }
        setSubElementValue(st, ServiceTag.REGISTRATION_STATUS, status.toString());
        writeToFile();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.