Examples of AxonConfigurationException


Examples of org.axonframework.common.AxonConfigurationException

    @SuppressWarnings("unchecked")
    @Override
    public void afterPropertiesSet() throws Exception {
        if (commandBus == null) {
            throw new AxonConfigurationException("CommandBus may not be null");
        }
        if (gatewayInterface == null) {
            gatewayInterface = (Class<T>) CommandGateway.class;
        }
        final GatewayProxyFactory factory = new GatewayProxyFactory(commandBus, retryScheduler, dispatchInterceptors);
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

    protected String doResolveRoutingKey(CommandMessage<?> command) {
        Object aggregateIdentifier;
        try {
            aggregateIdentifier = findIdentifier(command);
        } catch (InvocationTargetException e) {
            throw new AxonConfigurationException("An exception occurred while extracting aggregate "
                                                         + "information form a command", e);
        } catch (IllegalAccessException e) {
            throw new AxonConfigurationException("The current security context does not allow extraction of "
                                                         + "aggregate information from the given command.", e);
        }
        return aggregateIdentifier != null ? aggregateIdentifier.toString() : null;
    }
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

                                             AMQPMessageConverter messageConverter) {
        SpringAMQPConsumerConfiguration amqpConfig = SpringAMQPConsumerConfiguration.wrap(config);
        amqpConfig.setDefaults(defaultConfiguration);
        String queueName = amqpConfig.getQueueName();
        if (queueName == null) {
            throw new AxonConfigurationException("The Cluster does not define a Queue Name, "
                                                         + "nor is there a default Queue Name configured in the "
                                                         + "ListenerContainerLifeCycleManager");
        }
        if (containerPerQueue.containsKey(queueName)) {
            ClusterMessageListener existingListener = (ClusterMessageListener) containerPerQueue.get(queueName)
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

            }
            if (routingKeyResolver == null) {
                Map<String, RoutingKeyResolver> routingKeyResolverCandidates = applicationContext.getBeansOfType(
                        RoutingKeyResolver.class);
                if (routingKeyResolverCandidates.size() > 1) {
                    throw new AxonConfigurationException("No MessageConverter was configured, but none can be created "
                                                                 + "using autowired properties, as more than 1 "
                                                                 + "RoutingKeyResolver is present in the "
                                                                 + "ApplicationContent");
                } else if (routingKeyResolverCandidates.size() == 1) {
                    routingKeyResolver = routingKeyResolverCandidates.values().iterator().next();
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

    @Override
    public void setExclusive(SimpleMessageListenerContainer container, boolean exclusive) {
        try {
            exclusiveMethod.invoke(container, exclusive);
        } catch (Exception e) {
            throw new AxonConfigurationException(
                    "Error invoking setter method, please report this at http://issues.axonframework.org",
                    e);
        }
    }
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

                }
                newEntityAccessor = new EntityFieldAccessor(entityAccessor, field);
            } else if (field.isAnnotationPresent(CommandHandlingMemberCollection.class)) {
                CommandHandlingMemberCollection annotation = field.getAnnotation(CommandHandlingMemberCollection.class);
                if (!Collection.class.isAssignableFrom(field.getType())) {
                    throw new AxonConfigurationException(String.format(
                            "Field %s.%s is annotated with @CommandHandlingMemberCollection, but the declared type of "
                                    + "the field is not assignable to java.util.Collection.",
                            targetType.getSimpleName(), field.getName()));
                }
                Class<?> entityType = annotation.entityType();
                if (AbstractAnnotatedEntity.class.equals(entityType)) {
                    final Type genericType = field.getGenericType();
                    if (genericType == null
                            || !(genericType instanceof ParameterizedType)
                            || ((ParameterizedType) genericType).getActualTypeArguments().length == 0) {
                        throw new AxonConfigurationException(String.format(
                                "Field %s.%s is annotated with @CommandHandlingMemberCollection, but the entity"
                                        + " type is not indicated on the annotation, "
                                        + "nor can it be deducted from the generic parameters",
                                targetType.getSimpleName(), field.getName()));
                    }
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

                if (running) {
                    subscribe(proxy, adapter);
                }
                return proxy;
            } catch (Exception e) {
                throw new AxonConfigurationException("Unable to wrap annotated handler.", e);
            }
        }
        return bean;
    }
View Full Code Here

Examples of org.axonframework.common.AxonConfigurationException

                      "The given channel already has a receiver configured. "
                              + "Has the channel been reused with other Connectors?");
        try {
            channel.setReceiver(messageReceiver);
            if (channel.isConnected() && !clusterName.equals(channel.getClusterName())) {
                throw new AxonConfigurationException("The Channel that has been configured with this JGroupsConnector "
                                                             + "is already connected, but not through this cluster");
            } else if (channel.isConnected()) {
                // we need to fetch state now that we have attached our MessageReceiver
                channel.getState(null, 10000);
            } else {
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.