Examples of RegistrationException


Examples of org.gatein.registration.RegistrationException

            return parent.toModel(null, this).getRegistration(registrationId);
         }
      }
      catch (Exception e)
      {
         throw new RegistrationException(e);
      }
      finally
      {
         persister.closeSession(false);
      }
View Full Code Here

Examples of org.jayasoft.woj.common.model.registration.RegistrationException

                    || StringUtils.isBlank(u.getFirstName())
                    || StringUtils.isBlank(u.getLastName())
                    || StringUtils.isBlank(u.getCountry())
                ) {
                r = new RegistrationError();
                ((RegistrationError)r).setCause(new RegistrationException("missing required fields or fields contain only spaces"));
            } else if (!EmailHelper.doEmailSeemsValid(u.getEmail())) {
                r = new RegistrationError();
                ((RegistrationError)r).setCause(new RegistrationException("your email seems to be invalid"));
            } else {
                User registeredUser = ServiceFactory.getRegistrationService().registerTrialUser(u, hostId);
                ServiceFactory.getRegistrationService().sendEmailVerification(registeredUser);
                r = new RegistrationSuccessfull();
            }
View Full Code Here

Examples of org.jboss.fresh.events.RegistrationException

  }


  public synchronized void registerEventNetRouter(String agentid, EventNetRouter router) throws RegistrationException {
    EventNetRouter rt = (EventNetRouter) routers.get(agentid);
    if(rt != null) throw new RegistrationException("Router is already registered under the specified agentid: " + agentid + " (Either you should reuse existing one or there are more agents with same agentid - which should never be - which means wrong configuration.)");

    routers.put(agentid, router);
  }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

    @Test(expected = RuntimeException.class)
    public void failOnRegister() throws RegistrationException
    {
        MunitPollManager manager = new MunitPollManager(muleContext);

        doThrow(new RegistrationException(CoreMessages.noMuleTransactionAvailable())).when(muleRegistry)
                .registerObject(eq("__Munit_Poll_Stopper"), any(SchedulerFactoryPostProcessor.class));

        manager.avoidPollLaunch();
    }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

    @Test(expected = InitialisationException.class)
    public void testInitializeWithNoModuleObjectWhenObjectFails() throws InitialisationException, RegistrationException
    {
        MockMunitMessageProcessor mp = processorForInitialize(null);
        when(muleRegistry.lookupObject(AssertModule.class)).thenThrow(new RegistrationException(new Exception()));

        mp.initialise();
    }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

                    }
                }
                Transformer trans = (Transformer) ClassUtils.instanciateClass(transClass);
                if (!(trans instanceof DiscoverableTransformer))
                {
                    throw new RegistrationException(CoreMessages.transformerNotImplementDiscoverable(trans));
                }
                if (returnClass != null)
                {
                    trans.setReturnDataType(DataTypeFactory.create(returnClass, mime));
                }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

        {
            return objects.iterator().next();
        }
        else if (objects.size() > 1)
        {
            throw new RegistrationException(MessageFactory.createStaticMessage("More than one object of type " + type + " registered but only one expected."));
        }
        else
        {
            return null;
        }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

    public void registerObject(String key, Object object, Object metadata) throws RegistrationException
    {
        checkDisposed();
        if (StringUtils.isBlank(key))
        {
            throw new RegistrationException(MessageFactory.createStaticMessage("Attempt to register object with no key"));
        }

        if (logger.isDebugEnabled())
        {
            logger.debug(String.format("registering key/object %s/%s", key, object));
        }

        logger.debug("applying processors");
        object = applyProcessors(object, metadata);
        if (object == null)
        {
            return;
        }

        registryMap.putAndLogWarningIfDuplicate(key, object);

        try
        {
            if (!hasFlag(metadata, MuleRegistry.LIFECYCLE_BYPASS_FLAG))
            {
                if(logger.isDebugEnabled())
                {
                    logger.debug("applying lifecycle to object: " + object);
                }
                getLifecycleManager().applyCompletedPhases(object);
            }
        }
        catch (MuleException e)
        {
            throw new RegistrationException(e);
        }
    }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

    protected void checkDisposed() throws RegistrationException
    {
        if(getLifecycleManager().isPhaseComplete(Disposable.PHASE_NAME))
        {
            throw new RegistrationException(MessageFactory.createStaticMessage("Cannot register objects on the registry as the context is disposed"));
        }
    }
View Full Code Here

Examples of org.mule.api.registry.RegistrationException

                getLifecycleManager().applyPhase(obj, lifecycleManager.getCurrentPhase(), Disposable.PHASE_NAME);
            }
        }
        catch (MuleException e)
        {
            throw new RegistrationException(e);
        }

    }
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.